/* ============================================================
 * 视觉与趋势管理系统 · 全局样式
 * 时尚极简风：暖白底 + 暖灰黑文字 + 暖棕点缀，克制专业
 * ============================================================ */
:root {
  --bg: #f7f6f3;
  --bg2: #ffffff;
  --card: #ffffff;
  --line: #e5e1da;
  --txt: #2c2c2c;
  --sub: #8a857c;
  --gold: #8b7355;
  --gold2: #a68d6d;
  --danger: #c25e5a;
  --ok: #4a9c6d;
  --shade: #f0eee9;
  --shadow: 0 18px 40px rgba(60,52,42,.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC","Microsoft YaHei","Noto Sans SC",system-ui,-apple-system,sans-serif;
  background: var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
.hidden { display: none !important; }
img { display: block; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: rgba(34,47,38,.94); color: #e6f2ea;
  padding: 10px 20px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .3s; z-index: 999;
  box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.06);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 登录页 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(139,115,85,.10), transparent 60%),
    radial-gradient(900px 500px at 90% 110%, rgba(139,115,85,.05), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px; padding: 44px 40px 36px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow);
}
.brand { text-align: center; margin-bottom: 30px; }
.brand-mark { color: var(--gold); font-size: 26px; display: block; margin-bottom: 6px; }
.brand h1 { font-size: 26px; letter-spacing: 2px; font-weight: 600; }
.brand .subtitle { color: var(--sub); font-size: 13px; margin-top: 8px; letter-spacing: 3px; text-transform: uppercase; }
.auth-form label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 8px; }
.auth-form input {
  width: 100%; padding: 13px 16px; margin-bottom: 18px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--txt); font-size: 15px; outline: none; transition: border .2s;
}
.auth-form input:focus { border-color: var(--gold); }
.auth-links { text-align: center; margin-top: 20px; font-size: 13px; color: var(--sub); }
.auth-links a { opacity: .85; }
.auth-links a:hover { opacity: 1; }
.auth-sep { margin: 0 8px; color: var(--line); }
.form-title { font-size: 18px; margin-bottom: 18px; color: var(--txt); text-align: center; letter-spacing: 1px; }
.btn-block { width: 100%; }

.btn-primary {
  padding: 8px 16px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #2c2c2c; font-weight: 500; font-size: 13px; line-height: 1; cursor: pointer;
  letter-spacing: .3px; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(139,115,85,.22); }
.btn-primary:disabled { filter: grayscale(.6); cursor: not-allowed; transform: none; box-shadow: none; }
/* 登录框按钮仍保持全宽成熟样式 */
.auth-form .btn-primary { width: 100%; padding: 13px; border-radius: 10px; font-size: 15px; font-weight: 600; }

.btn-ghost {
  padding: 7px 14px; background: transparent; color: var(--sub);
  border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 12.5px; line-height: 1;
  letter-spacing: .3px; white-space: nowrap; transition: .2s;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold); }
.btn-danger {
  padding: 7px 14px; background: transparent; color: var(--danger);
  border: 1px solid rgba(207,90,87,.5); border-radius: 7px; cursor: pointer; font-size: 12.5px; line-height: 1;
  letter-spacing: .3px; white-space: nowrap; transition: .2s;
}
.btn-danger:hover { background: rgba(207,90,87,.15); }

/* ================= 前台画廊 ================= */
.gallery-view { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,246,243,.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: none; margin: 0; padding: 10px 14px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand-sm { font-size: 16px; font-weight: 600; letter-spacing: 1px; white-space: nowrap; }
.brand-sm span:first-child { color: var(--gold); }
.cats { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.cat-tab {
  padding: 7px 16px; background: var(--card); color: var(--sub);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 13px; transition: .2s;
}
.cat-tab:hover { color: var(--txt); border-color: var(--line); }
.cat-tab.active { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #2c2c2c; border-color: transparent; font-weight: 600; }

.grid-wrap { max-width: 1200px; margin: 0 auto; padding: 30px 20px 60px; }

/* 左侧菜单布局内：右侧内容区不再居中，占满网格列 */
.gallery-layout .grid-wrap { max-width: none; margin: 0; padding: 0; }

/* ---------- 前台左右布局：左侧类目菜单 + 右侧图片 ---------- */
.gallery-layout {
  max-width: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 210px 1fr; gap: 14px; align-items: start;
}
.sidebar {
  position: sticky; top: 78px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 12px; max-height: calc(100vh - 100px); overflow-y: auto;
}
.side-head {
  font-size: 14px; color: var(--gold); font-weight: 600; letter-spacing: 1px;
  padding: 4px 8px 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.cat-menu { display: flex; flex-direction: column; gap: 4px; }
.cat-menu-row { display: flex; align-items: center; gap: 4px; }
.cat-menu-row .cat-menu-item { flex: 1; min-width: 0; }
.cat-menu-item {
  display: block; width: 100%; text-align: left; padding: 9px 12px;
  background: transparent; color: var(--sub); border: none; border-radius: 8px;
  cursor: pointer; font-size: 14px; transition: .2s;
}
.cat-menu-item:hover { background: var(--card); color: var(--txt); }
.cat-menu-item.active {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #2c2c2c; font-weight: 600;
}
/* 残留类目删除按钮（图片中有该类目但未在配置表） */
.cat-menu-del {
  flex: 0 0 auto; width: 22px; height: 22px; line-height: 18px; padding: 0;
  text-align: center; font-size: 14px; font-weight: 700;
  background: var(--danger, #e5484d); color: #fff; border: none; border-radius: 6px;
  cursor: pointer; opacity: .75; transition: .2s;
}
.cat-menu-del:hover { opacity: 1; background: #d33a3f; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

/* ---------- 后台：类目/常用类目勾选清单 ---------- */
.check-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px; max-height: 320px; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; margin-bottom: 16px;
}
.check-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--sub); cursor: pointer; padding: 6px 8px; border-radius: 6px;
  transition: background .15s;
}
.check-item:hover { background: var(--card); color: var(--txt); }
.check-item input { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }
.hint-inline { font-size: 12px; color: var(--sub); font-weight: 400; letter-spacing: 0; }
#fav-save, #cat-mgmt-save { max-width: 260px; }
.cell {
  cursor: zoom-in; border-radius: 6px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
.cell:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.holder { aspect-ratio: 1 / 1; overflow: hidden; position: relative; background: var(--shade); }
.holder img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s;
}
.holder img.loaded { opacity: 1; }
.holder img.lazy-fallback { opacity: 1; }
.cell-cap {
  padding: 5px 8px; font-size: 12px; color: var(--sub);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.empty-tip { text-align: center; color: var(--sub); padding: 80px 0; font-size: 15px; }

/* ---------- 前台图片比例 & 鼠标悬浮标签 ---------- */
#grid .cell { position: relative; }
#grid .holder { aspect-ratio: 3 / 4; }           /* 竖版 1340:1785 (≈3:4) */
.cell-hover-mask {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(180deg, rgba(12,14,18,.0) 30%, rgba(12,14,18,.85) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 2px; padding: 10px 12px 12px;
  opacity: 0; transition: opacity .18s ease; pointer-events: none;
}
.cell:hover .cell-hover-mask { opacity: 1; }
.hcap-row { font-size: 12px; color: #eee; line-height: 1.5; display: flex; gap: 7px; }
.hcap-row b { color: #cfbda4; font-weight: 600; min-width: 34px; flex: none; }
.hcap-row.ch b { color: #dcae57; }
.hcap-row.st b { color: #9db9ff; }
.hcap-row.el b { color: #8fd9ac; }
.hcap-row.sc b { color: #e2b08a; }
.hcap-row.sh b { color: #cbabe9; }
.hcap-row.sk b { color: #e6a0a0; }
.hcap-row span { color: #f2f2f2; }
.hcap-empty { color: #9aa0ab; font-size: 12px; }

/* ---------- 标签维度前端展示开关 ---------- */
.frontend-dim-switches {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin-top: 6px;
}
.fds-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); cursor: pointer; user-select: none;
}
.fds-row.on { border-color: var(--gold); }
.fds-name { flex: 1; font-size: 13px; color: var(--txt); }
.fds-state { font-size: 12px; color: var(--sub); }
.fds-switch {
  width: 34px; height: 19px; border-radius: 999px; background: #d6d6d6;
  position: relative; transition: background .2s; flex: none;
}
.fds-switch i {
  position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: #fff; transition: left .2s;
}
.fds-switch.on { background: var(--gold); }
.fds-switch.on i { left: 17px; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center;
}
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 8px; box-shadow: var(--shadow); }
.lb-close { position: absolute; top: 18px; right: 24px; background: none; border: none; color: #fff; font-size: 40px; cursor: pointer; line-height: 1; opacity: .8; }
.lb-close:hover { opacity: 1; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.08); border: none; color: #fff; font-size: 44px;
  width: 54px; height: 54px; border-radius: 50%; cursor: pointer; line-height: 1; transition: .2s;
}
.lb-nav:hover { background: rgba(255,255,255,.2); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-caption {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: #ddd; font-size: 14px; background: rgba(0,0,0,.5); padding: 5px 14px; border-radius: 999px;
}
.lb-open-link {
  position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; font-size: 14px; text-decoration: none;
  background: rgba(20,110,255,.85); padding: 7px 18px; border-radius: 999px;
  transition: background .2s;
}
.lb-open-link:hover { background: rgba(20,110,255,1); }

/* ================= 后台 ================= */
.admin-panel { min-height: 100vh; }
.admin-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,15,17,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
}
.admin-head .btn-ghost { margin-left: 10px; }
.ghost-chip { padding: 6px 12px; border-radius: 999px; font-size: 12px; background: var(--card); border: 1px solid var(--line); color: var(--sub); }
.ghost-chip.bad { color: var(--danger); border-color: rgba(207,90,87,.4); }
.admin-body { display: flex; gap: 18px; align-items: flex-start; max-width: none; margin: 0 auto; padding: 18px 14px 70px; }
.admin-side {
  flex: 0 0 210px; position: sticky; top: 70px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: block; padding: 11px 14px; border-radius: 9px; cursor: pointer;
  color: var(--sub); font-size: 14px; text-decoration: none;
  border: 1px solid transparent; transition: all .18s;
}
.nav-item:hover { background: rgba(139,115,85,.08); color: var(--txt); }
.nav-item.active { background: linear-gradient(135deg, rgba(139,115,85,.16), rgba(139,115,85,.05)); color: var(--gold); border-color: rgba(139,115,85,.4); }
.nav-item.hidden { display: none; }
.admin-main { flex: 1; min-width: 0; display: grid; gap: 26px; }
.admin-main .panel-card { margin-bottom: 0; }

/* ---------- 前台预览（后台内嵌） ---------- */
.no-scroll { overflow: hidden !important; }
.preview-mask {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center;
  padding: 22px;
}
.preview-shell {
  width: 100%; height: 100%; max-width: 1500px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow);
}
.preview-toolbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--bg2); border-bottom: 1px solid var(--line);
}
.preview-title { font-size: 15px; font-weight: 600; color: var(--gold); letter-spacing: 1px; }
.preview-tabs { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; }
.preview-tab {
  background: none; border: 1px solid var(--line); color: var(--sub);
  font-size: 13px; padding: 6px 14px; border-radius: 8px; cursor: pointer; transition: all .18s;
}
.preview-tab:hover { color: var(--txt); border-color: var(--gold); }
.preview-tab.active {
  background: linear-gradient(135deg, rgba(139,115,85,.16), rgba(139,115,85,.05));
  color: var(--gold); border-color: rgba(139,115,85,.4);
}
.preview-tools { display: flex; gap: 8px; flex: 0 0 auto; }
.preview-tools .btn-ghost, .preview-tools .btn-danger { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.preview-frame { flex: 1 1 auto; width: 100%; border: 0; background: #fff; }
.panel-card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 18px;
}
.panel-card h2 { font-size: 16px; margin-bottom: 8px; letter-spacing: 1px; color: var(--txt); }
.panel-card h2::before { content: "— "; color: var(--gold); }
.hint { color: var(--sub); font-size: 13px; margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: center; }
.row .input, .row input[type=password] {
  flex: 1; padding: 12px 14px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 9px; color: var(--txt); font-size: 14px; outline: none;
}
.row input:focus { border-color: var(--gold); }
.repo-info { margin-top: 14px; font-size: 13px; color: var(--sub); }
.repo-info b { color: var(--txt); }
.field { display: block; font-size: 13px; color: var(--sub); margin-bottom: 8px; }
.cat-input-row { display: flex; gap: 10px; }
select.input {
  padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 9px; color: var(--txt); font-size: 14px; outline: none; flex: 1;
}

/* 拖拽区 */
.dropzone {
  margin-top: 16px; border: 2px dashed var(--line); border-radius: 14px;
  padding: 40px 20px; text-align: center; cursor: pointer; transition: .2s;
}
.dropzone.over { border-color: var(--gold); background: rgba(139,115,85,.06); }
.dz-icon { font-size: 34px; color: var(--gold); }
.dz-inner p { color: var(--sub); font-size: 14px; margin-top: 8px; }
.dz-inner em { font-style: normal; color: var(--gold); }
.dz-sub { font-size: 12px !important; opacity: .7; }

.pending-list { margin-top: 16px; display: grid; gap: 8px; }
.pending-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px;
}
.pname { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psize { color: var(--sub); font-size: 12px; }
.x { background: none; border: none; color: var(--danger); font-size: 20px; cursor: pointer; line-height: 1; }

#upload-btn { margin-top: 18px; }
.url-match-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.url-match-row .hint { flex: 1 1 320px; color: var(--sub); font-size: 12px; }
.url-match-row .hint code { color: var(--gold); }
.url-match-row.top { margin-top: 0; margin-bottom: 14px; padding: 10px 12px; background: rgba(139,115,85,.06); border: 1px dashed rgba(139,115,85,.35); border-radius: 10px; }
.url-match-row.top .btn-primary { white-space: nowrap; }
.url-match-result { font-size: 12px; color: var(--sub); }
.url-match-result.ok { color: #2ecc71; }
.progress { margin-top: 16px; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--gold2)); transition: width .3s; }

/* 管理列表（前台同款网格布局） */
.manage-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.manage-toolbar .btn-danger:disabled { cursor: not-allowed; opacity: .5; }
#batch-del-btn { padding: 8px 16px; }
.manage-layout { border-top: 1px solid var(--line); padding-top: 14px; }
/* 管理网格 cell：勾选框 + 删除按钮悬浮 */
.manage-layout .sidebar { top: 14px; padding: 10px 8px; }
.manage-layout .cat-menu-item { font-size: 13px; padding: 7px 10px; }
.manage-layout { grid-template-columns: 180px 1fr; }
#manage-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
#manage-grid .cell { position: relative; cursor: default; }
#manage-grid .holder img { cursor: default; }
.mgr-check {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  width: 18px; height: 18px; cursor: pointer; accent-color: var(--gold);
}
.mgr-del {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  padding: 2px 9px; font-size: 12px; line-height: 1.5; background: rgba(14,15,17,.55); backdrop-filter: blur(4px);
}
.mgr-del:hover { background: rgba(207,90,87,.25); }
/* 已勾选高亮 */
#manage-grid .cell.selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(139,115,85,.35); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .gallery-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static; max-height: none;
    /* 手机上水平滚动菜单 */
    padding: 10px; overflow-x: auto;
  }
  .side-head { display: none; }
  .cat-menu { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; }
  .cat-menu-item { white-space: nowrap; }
  .cat-menu-row { flex: 0 0 auto; }
  .cat-menu-row .cat-menu-item { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .topbar-inner { gap: 10px; }
  .cats { order: 3; width: 100%; }
  .admin-main { padding: 20px 12px 60px; }
  .admin-body { flex-direction: column; padding: 16px 10px 60px; gap: 14px; }
  .admin-side { flex: none; width: 100%; position: static; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .nav-item { flex: 1 1 auto; text-align: center; padding: 10px 8px; font-size: 13px; }
  .cat-input-row { flex-direction: column; }
  .lb-nav { width: 42px; height: 42px; font-size: 34px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .gallery-layout { padding: 0; gap: 12px; }
  .check-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
/* ---------- 前台类目展示顺序 ---------- */
.order-block { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line, rgba(128,128,128,.25)); }
.order-title { font-size: 13px; font-weight: 600; color: var(--muted, #999); margin: 0 0 10px; }
.cat-order-box { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
#cat-order-save { margin-top: 12px; align-self: flex-start; }
.cat-order-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid var(--line, rgba(128,128,128,.2)); border-radius: 7px; background: var(--card, #1b1d21); }
.cat-order-item .order-num { width: 58px; padding: 4px 6px; border: 1px solid rgba(128,128,128,.3); border-radius: 5px; background: transparent; color: var(--txt, #eee); font-size: 13px; }
.cat-order-item .order-num:focus { outline: none; border-color: var(--gold, #8b7355); }
.cat-order-item .order-name { flex: 1; font-size: 13px; color: var(--txt, #e8e8e8); }
.cat-order-item button { min-width: 28px; height: 28px; border: 1px solid rgba(128,128,128,.25); border-radius: 5px; background: transparent; color: var(--txt, #ccc); font-size: 14px; cursor: pointer; line-height: 1; }
.cat-order-item button:hover { background: rgba(139,115,85,.12); color: var(--gold, #8b7355); }

/* ---------- 前台访问设置开关 ---------- */
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 14px;
}
.switch-row input[type="checkbox"] {
  width: 40px;
  height: 22px;
  appearance: none;
  -webkit-appearance: none;
  background: #ccc;
  border-radius: 22px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
  margin: 0;
}
.switch-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: left .2s;
}
.switch-row input[type="checkbox"]:checked {
  background: #2563eb;
}
.switch-row input[type="checkbox"]:checked::after {
  left: 20px;
}
.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ================= 渠道标签筛选栏（前台，吸顶始终可见） ================= */
.tag-filter {
  position: sticky; top: 46px; z-index: 40;
  margin-bottom: 12px;
  border-radius: 12px;
}
/* 折叠触发条：默认仅占一行 */
.tf-trigger {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer; user-select: none;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .2s;
}
.tf-trigger:hover { border-color: var(--gold); }
.tf-t { font-size: 13px; color: var(--gold); font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.tf-s { flex: 1; min-width: 0; font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-arrow { color: var(--gold); font-size: 13px; transition: transform .25s; }
.tag-filter:hover .tf-arrow { transform: rotate(180deg); }
/* 展开面板：hover 触发，悬浮于内容上方，不挤占顶部 */
.tf-body {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  z-index: 60; border-radius: 12px;
  background: rgba(255,255,255,.98); backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 14px 14px 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  pointer-events: none;
}
.tag-filter:hover .tf-body { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.tf-groups { display: flex; flex-direction: column; gap: 12px; max-height: 56vh; overflow-y: auto; padding: 2px;}
.tf-groups .tag-group { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tag-group-name {
  font-size: 12px; color: var(--gold); font-weight: 600; white-space: nowrap;
  padding-right: 10px; border-right: 1px solid var(--line);
}

.tag-subgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(156,139,116,.06); border: 1px solid var(--line); border-radius: 8px; }
.tag-subgroup + .tag-subgroup { margin-top: 8px; }
.tag-subgroup-name {
  font-size: 12px; color: var(--txt); font-weight: 700; white-space: nowrap;
  min-width: 34px; letter-spacing: .5px;
}
.tag-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px; cursor: pointer;
  background: var(--card); color: var(--sub);
  border: 1px solid var(--line); font-size: 13px; transition: .2s; white-space: nowrap;
}
.tag-chip:hover { color: var(--txt); border-color: var(--gold); }
.tag-chip.active {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #2c2c2c; font-weight: 600; border-color: transparent;
}
.tag-chip.zero { opacity: .45; }
.tag-chip.zero:hover { opacity: .75; }
.tc-count {
  font-size: 11px; background: rgba(255,255,255,.12); border-radius: 999px;
  padding: 0 6px; line-height: 15px;
}
.tag-chip.active .tc-count { background: rgba(44,44,44,.18); }

/* ================= 批量打标签弹窗（后台） ================= */
.modal-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.62); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  width: min(600px, 94vw); max-height: 84vh; overflow-y: auto;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow);
}
.modal h3 { font-size: 16px; margin-bottom: 8px; letter-spacing: 1px; color: var(--txt); }
.mtag-groups { display: flex; flex-direction: column; gap: 16px; margin: 14px 0 18px; }
.mtag-group-name {
  font-size: 13px; color: var(--gold); font-weight: 600; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.mtag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mtag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 12px; font-size: 13px; color: var(--txt); cursor: pointer; transition: .15s;
}
.mtag-chip:hover { border-color: var(--gold); }
.mtag-chip:has(input:checked) { border-color: var(--gold); background: rgba(139,115,85,.12); }
.mtag-chip input { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }
.mtag-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mtag-actions .btn-primary { width: auto; padding: 10px 20px; }
.mtag-actions .btn-danger, .mtag-actions .btn-ghost { padding: 9px 16px; }

/* ================= 后台管理卡片：类目 + 标签两行 ================= */
#manage-grid .mgr-cap { padding: 5px 8px; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }
#manage-grid .mgr-cap-line { font-size: 11px; color: var(--sub); }
#manage-grid .mgr-cap-tags { font-size: 11px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#manage-grid .mgr-cap-tags.none { color: rgba(154,160,166,.5); }

@media (max-width: 640px) {
  .tag-filter { top: 0; margin-bottom: 10px; }
  .tf-trigger { border-radius: 0; border-left: none; border-right: none; }
  .tf-body { left: 0; right: 0; }
  .tf-groups .tag-group { flex-direction: column; align-items: stretch; gap: 6px; }
  .tf-groups .tag-group-name { border-right: none; border-bottom: 1px solid var(--line); padding: 0 0 6px; }
  .tag-chip { white-space: nowrap; }
  .modal { padding: 18px; }
}

/* ================= 前台图片底部：渠道/风格/元素 标签行（不显示文件名） ================= */
#grid .cap-row {
  display: block; font-size: 11px; line-height: 1.4; color: var(--sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#grid .cap-row i {
  font-style: normal; margin-right: 4px; font-weight: 600; opacity: .7;
}
#grid .cap-row.ch i { color: var(--gold); }
#grid .cap-row.st i { color: #6ea8fe; }
#grid .cap-row.el i { color: #7ee0a3; }

/* ================= 后台图片卡片：类目/渠道/风格/元素 四行 ================= */
#manage-grid .mgr-cap { padding: 5px 8px; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
#manage-grid .mgr-cap-row { font-size: 10.5px; color: var(--sub); display: flex; gap: 4px; overflow: hidden; }
#manage-grid .mgr-cap-row i { font-style: normal; font-weight: 600; flex: none; min-width: 24px; opacity: .75; }
#manage-grid .mgr-cap-row.cat { color: var(--gold); }
#manage-grid .mgr-cap-row.ch i { color: var(--gold); }
#manage-grid .mgr-cap-row.st i { color: #6ea8fe; }
#manage-grid .mgr-cap-row.el i { color: #7ee0a3; }

/* ================= 标签管理（后台 ⑥） ================= */
.tag-mgmt-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-top: 12px; }
@media (max-width: 900px) { .tag-mgmt-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .tag-mgmt-grid { grid-template-columns: 1fr; } }
.tag-mgmt-col { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.tg-col-title { font-size: 13px; color: var(--gold); margin-bottom: 12px; letter-spacing: .5px; }
.tag-mgmt-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.tagdef-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-size: 13px; color: var(--txt);
}
.tagdef-chip .tagdef-used { font-size: 11px; color: var(--sub); background: rgba(255,255,255,.08); border-radius: 999px; padding: 0 6px; line-height: 15px; }
.tagdef-chip .tagdef-del {
  border: none; background: transparent; color: #e07a7a; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 2px; border-radius: 4px;
}
.tagdef-chip .tagdef-del:hover { color: #ff9a9a; background: rgba(224,122,122,.12); }
/* 标签改名按钮 */
.tagdef-edit { border: 0; background: none; color: var(--sub); cursor: pointer; font-size: 12px; line-height: 1; opacity: .7; margin-left: 3px; padding: 0 2px; border-radius: 4px; }
.tagdef-edit:hover { color: var(--gold); opacity: 1; background: rgba(255,255,255,.1); }
/* 场景标签二级分组标题 */
.tagdef-subgroup { width: 100%; margin-bottom: 8px; }
.tagdef-subgroup-name { display: block; font-size: 12px; font-weight: 600; color: var(--gold); letter-spacing: .05em; margin: 2px 0 6px; padding-bottom: 3px; border-bottom: 1px dashed rgba(var(--gold), .3); }
/* 场景标签录入：先选室内/室外再填名 */
.tag-scene-add .scene-add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.scene-group-select { flex: 0 0 70px; width: 70px; }
/* 标签搜索框 */
.tag-mgmt-search.row-search-top { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.tag-search-input { flex: 1; max-width: 420px; }
/* 类目删除按钮 */
.check-item .check-del { margin-left: auto; border: 0; background: none; color: var(--sub); cursor: pointer; font-size: 11px; padding: 1px 6px; border-radius: 999px; opacity: .65; }
.check-item .check-del:hover { color: #ff9a9a; background: rgba(224,122,122,.12); opacity: 1; }
.check-item { display: flex; align-items: center; gap: 6px; }
/* 场景看板：室内/室外分组 */
.hbar-grouped { width: 100%; }
.hbar-group { margin-bottom: 12px; }
.hbar-group-head { font-size: 13px; font-weight: 600; color: var(--gold); margin-bottom: 6px; }
.hbar-group .hbar { margin: 4px 0; }
.tag-mgmt-add { display: flex; gap: 8px; margin-top: 12px; }
.tag-mgmt-add .input { flex: 1; }

/* ================= 数据看板（后台 ⑦） ================= */
.dash-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dash-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 720px) { .dash-overview { grid-template-columns: repeat(2, 1fr); } }
.dash-ov-card {
  background: linear-gradient(135deg, rgba(139,115,85,.14), rgba(139,115,85,.03));
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center;
}
.dash-ov-num { font-size: 30px; font-weight: 700; color: var(--gold); line-height: 1.1; }
.dash-ov-label { font-size: 12px; color: var(--sub); margin-top: 6px; }
.dash-charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
@media (max-width: 980px) { .dash-charts { grid-template-columns: 1fr; } }
.dash-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.dash-chart-title { font-size: 13px; color: var(--txt); margin-bottom: 12px; letter-spacing: .5px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.hbar-list { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: 88px 1fr 54px; align-items: center; gap: 8px; }
.hbar-name {
  font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: right; transition: color .15s;
}
.hbar:hover .hbar-name { color: var(--txt); }
.hbar-track { height: 16px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.hbar-num { font-size: 12px; color: var(--txt); text-align: right; white-space: nowrap; }
.hbar-num i { font-style: normal; font-size: 10.5px; color: var(--sub); margin-left: 4px; }
.dash-donut-wrap .dash-card { max-width: 320px; }
.donut-box { display: flex; justify-content: center; padding: 8px 0; }
.donut {
  width: 168px; height: 168px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.donut-hole {
  width: 112px; height: 112px; border-radius: 50%;
  background: var(--bg2); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-hole b { font-size: 28px; color: var(--gold); line-height: 1; }
.donut-hole span { font-size: 11px; color: var(--sub); margin-top: 6px; }

/* ================= 智能打标（拖拽池） ================= */
.smart-modal-box { width: 92vw !important; max-width: 1300px; display: flex; flex-direction: column; max-height: 84vh; overflow: hidden; }
.smart-head-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.smart-head-actions { display: flex; align-items: center; gap: 8px; }
.smart-head-actions .smart-url-btn { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600; position: relative; z-index: 20; cursor: pointer; }
.smart-head-actions .smart-url-btn:hover { background: var(--gold2); border-color: var(--gold2); color: #fff; }
.smart-modal-box > *:not(.smart-pools) { flex: 0 0 auto; }
.smart-dims { display: flex; gap: 8px; margin: 10px 0 6px; flex-wrap: wrap; flex: 0 0 auto; }
.smart-dim { padding: 6px 18px; border: 1px solid var(--line); background: var(--card); color: var(--txt); border-radius: 20px; cursor: pointer; font-size: 13px; }
.smart-dim.active { border-color: var(--gold); color: var(--gold); background: rgba(139,115,85,.12); }
.smart-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; padding: 8px 0 4px; margin-bottom: 10px; border-bottom: 1px dashed var(--line); align-items: center; flex: 0 0 auto; }
.smart-tag { padding: 4px 12px; border: 1px solid var(--line); background: var(--card); color: var(--txt); border-radius: 14px; cursor: pointer; font-size: 12px; }
.smart-tag.active { border-color: var(--gold); color: var(--gold); background: rgba(139,115,85,.12); }
.smart-tag-add { border: 1px dashed var(--gold); color: var(--gold); background: transparent; }
.smart-tag-add:hover { background: rgba(139,115,85,.10); }
.smart-tag-empty { font-size: 12px; color: var(--sub); }
.smart-pools { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 200px 1fr; gap: 14px; margin: 6px 0 14px; }
.smart-pool { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; background: var(--card); }
.smart-pool-head { padding: 9px 14px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.04); border-bottom: 1px solid var(--line); letter-spacing: .5px; flex: 0 0 auto; }
.smart-pool-head .sp-count { margin-left: 6px; font-weight: 400; color: var(--sub); }
.smart-pool-grid { flex: 1 1 auto; min-height: 0; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; overflow-y: auto; align-content: start; grid-auto-rows: max-content; }
.smart-pool-grid.drop-over { outline: 2px dashed var(--gold); outline-offset: -4px; background: rgba(139,115,85,.06); }
.smart-card { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #191c20; cursor: grab; transition: border-color .15s, transform .15s; }
.smart-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.smart-card.dragging { opacity: .45; border-style: dashed; }
.smart-card .holder { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: var(--shade); }
.smart-card .holder img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; opacity: 1 !important; }
/* 智能打标卡片：标签浮层叠加显示在图片顶部（前台式） */
.smart-card { position: relative; }
.smart-card-tags { position: absolute; top: 6px; left: 6px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; pointer-events: none; max-width: calc(100% - 12px); }
.smart-tag-row { display: flex; align-items: baseline; gap: 5px; font-size: 10.5px; line-height: 1.45; max-width: 100%; padding: 1px 7px; border-radius: 6px; background: rgba(12,14,18,.55); backdrop-filter: blur(3px); }
.smart-tag-row b { color: #fff; font-weight: 600; min-width: 24px; flex: none; opacity: .9; }
.smart-tag-row span { color: #f3efe9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-tag-row.cat b { color: #ecd9b3; }
.smart-tag-row.ch b { color: #dcae57; }
.smart-tag-row.st b { color: #9db9ff; }
.smart-tag-row.el b { color: #8fd9ac; }
.smart-tag-row.sc b { color: #d8bfea; }
.smart-tag-row.sh b { color: #8fd7c0; }
.smart-tag-row.sk b { color: #f0b8b8; }
.smart-tag-row.none b { color: #bbb; }
.smart-tag-row.none span { color: #bbb; font-style: italic; }
.smart-card:hover .smart-tag-row span { white-space: normal; word-break: break-all; }

/* ========== 标签管理综合页（常用类目/前台类目/风格·元素标签） ========== */
.tag-sub { display: flex; flex-direction: column; gap: 12px; }
.tag-sub + .tag-sub { margin-top: 4px; }
.tbs-title { font-size: 14px; color: var(--gold2); margin: 0; }
.tag-sub-hr { border: none; border-top: 1px dashed var(--line); margin: 4px 0 14px; }

/* ========== 数据看板 · 类目筛选 ========== */
.dash-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-cat-filter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); }
.dash-cat-filter select {
  background: var(--card); color: var(--txt); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; max-width: 260px; cursor: pointer;
}
.dash-cat-filter select:hover, .dash-cat-filter select:focus { border-color: var(--gold); outline: none; }
.hbar-num i { font-style: normal; font-size: 11px; color: var(--gold); margin-left: 8px; }

/* ========== 前台 · 顶部专区切换 Tab ========== */
.top-tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tab-link {
  padding: 7px 18px; border-radius: 999px; font-size: 14px; color: var(--sub);
  background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: all .2s; text-decoration: none; white-space: nowrap;
}
.tab-link:hover { color: var(--txt); border-color: var(--gold); }
.tab-link.active { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #2c2c2c; border-color: transparent; font-weight: 600; }
.trend-entry { text-decoration: none; }

/* ========== 趋势专区前台：筛选栏 + 文件列表 ========== */
.trend-filter {
  position: sticky; top: 0; z-index: 40;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 14px; background: rgba(16,16,18,.92);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.trend-filter-btn {
  background: transparent; color: var(--sub); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 16px; font-size: 13px; cursor: pointer; transition: all .15s;
}
.trend-filter-btn:hover { border-color: var(--gold); color: var(--txt); }
.trend-filter-btn.active { background: var(--gold); border-color: var(--gold); color: #101012; font-weight: 600; }
.trend-list { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.trend-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.trend-card:hover { border-color: var(--gold); }
.trend-card-icon {
  width: 46px; height: 46px; flex: none; border-radius: 10px;
  background: linear-gradient(135deg, #8b7355, #6f5a43); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
}
.trend-card-body { flex: 1; min-width: 0; }
.trend-card-title { font-size: 14px; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-card-meta { margin-top: 4px; }
.trend-tag {
  display: inline-block; background: rgba(139,115,85,.14); color: var(--gold);
  border: 1px solid rgba(139,115,85,.3); border-radius: 999px; padding: 2px 10px; font-size: 12px;
}
.trend-open { flex: none; text-decoration: none; }

/* ========== 趋势 PDF 预览弹层 ========== */
.pdf-modal-box { width: min(1100px, 96vw); height: 90vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.pdf-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pdf-modal-head span { font-size: 14px; font-weight: 600; color: var(--txt); }
.pdf-frame { flex: 1; width: 100%; border: none; background: #2b2b2b; }

/* ========== 后台 · 趋势专区管理 ========== */
.trend-upload { display: flex; flex-direction: column; gap: 12px; }
.trend-tag-select { display: flex; gap: 16px; flex-wrap: wrap; }
.trend-tag-select .chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--txt); cursor: pointer; }
.trend-tag-select input[type="radio"] { accent-color: var(--gold); width: 15px; height: 15px; }
.trend-manage-head { display: flex; align-items: baseline; gap: 12px; }
.trend-admin-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.trend-admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.trend-admin-row:hover { border-color: var(--gold); }
.trend-admin-info { min-width: 0; }
.trend-admin-title { font-size: 14px; color: var(--txt); }
.trend-admin-meta { font-size: 12px; color: var(--sub); margin-top: 3px; }
.trend-admin-ops { flex: none; }
.trend-admin-ops .btn-ghost { font-size: 12px; padding: 5px 12px; }

/* ============ 趋势专区前台：吸顶筛选+网格卡片 ============ */
.trend-filter { position: sticky; top: 0; z-index: 20; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding: 16px 14px; }
.trend-card.tc-grid { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; min-height: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.trend-card.tc-grid:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: var(--shadow); }
.trend-card-cover { width: 100%; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg,#1b1f2b 0%,#0f1117 100%); position: relative; overflow: hidden; }
.trend-card-cover.img { background: #111; }
.trend-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.tcov-ic { font-size: 26px; font-weight: 700; color: var(--gold); letter-spacing: 2px; }
.trend-card.tc-grid .trend-card-body { padding: 12px 14px; flex: 1; }
.trend-card.tc-grid .trend-card-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; font-size: 15px; font-weight: 600; }
.trend-card-desc { margin-top: 6px; font-size: 12px; color: var(--sub); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trend-cat { background: rgba(255,255,255,.06); }
.trend-card.tc-grid .trend-open { margin: 0 14px 14px; width: calc(100% - 28px); }
@media (max-width: 720px) {
  .trend-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px 10px; }
}

/* ============ 趋势专区 PDF 自绘预览（无下载/打印按钮） ============ */
.pdf-modal-tools { display: flex; align-items: center; gap: 8px; }
.pdf-modal-tools .btn-ghost { font-size: 12px; padding: 5px 10px; }
.pdf-modal-tools .btn-ghost:disabled { opacity: .35; cursor: not-allowed; }
.pdf-pageno { font-size: 13px; color: var(--sub); min-width: 56px; text-align: center; }
.pdf-sep { color: var(--line); }
.pdf-stage { flex: 1; overflow: auto; background: #26262b; display: flex; align-items: flex-start; justify-content: center; padding: 18px; position: relative; }
.pdf-canvas { max-width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,.55); background: #fff; }
.pdf-canvas[style*="display: none"] { display: none !important; }
.pdf-loading { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); color: var(--sub); font-size: 14px; }
.pdf-tip { padding: 8px 16px; text-align: center; font-size: 12px; color: var(--sub); border-top: 1px solid var(--line); background: rgba(0,0,0,.25); }

/* ================= 前台公告弹窗 ================= */
.notice-badge {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  border-radius: 8px; background: var(--gold); color: #1a1a1a;
  font-size: 11px; text-align: center; padding: 0 4px; margin-left: 6px; margin-top: -6px;
}
#notice-modal {
  position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.66);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.notice-dialog {
  width: min(640px, 94vw); max-height: 82vh; display: flex; flex-direction: column;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
.notice-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.notice-tabs { display: flex; gap: 8px; }
.notice-tab-btn {
  background: transparent; border: 1px solid var(--line); color: var(--sub);
  border-radius: 8px; padding: 7px 16px; font-size: 14px; cursor: pointer; transition: .15s;
}
.notice-tab-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(139,115,85,.12); }
.notice-head-actions { display: flex; align-items: center; gap: 10px; }
.hint-inline { font-size: 12px; color: var(--sub); }
.notice-close {
  background: transparent; border: none; color: var(--sub); font-size: 26px;
  line-height: 1; cursor: pointer; padding: 0 4px;
}
.notice-close:hover { color: var(--txt); }
.notice-modal-body { overflow-y: auto; padding: 12px 18px 18px; }
.notice-empty { text-align: center; color: var(--sub); padding: 40px 0; font-size: 14px; }
.notice-card { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--card); overflow: hidden; }
.notice-card.unread { border-color: rgba(139,115,85,.5); }
.notice-card-head {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: transparent; border: none; padding: 12px 14px; cursor: pointer; color: var(--txt);
}
.notice-card-head:hover { background: rgba(255,255,255,.04); }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sub); flex: none; }
.notice-card.unread .notice-dot { background: var(--gold); }
.notice-card-title { font-size: 15px; font-weight: 600; flex: 1; letter-spacing: .3px; }
.notice-card-time { font-size: 12px; color: var(--sub); white-space: nowrap; }
.notice-card-arrow { color: var(--sub); font-size: 12px; transition: transform .15s; }
.notice-card-head.open .notice-card-arrow { transform: rotate(180deg); }
.notice-card-body { display: none; padding: 0 14px 14px; }
.notice-card-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.notice-card-imgs img {
  width: 100px; height: 100px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; pointer-events: none;
}
.notice-card-text { font-size: 14px; color: var(--txt); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

/* ================= 后台公告管理 ================= */
.notice-img-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.notice-thumb { position: relative; width: 72px; height: 72px; }
.notice-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.notice-thumb-x {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; background: #e05252; color: #fff; border: none; font-size: 13px;
  line-height: 1; cursor: pointer;
}
.notice-admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px;
}
.notice-admin-info { flex: 1; min-width: 0; }
.notice-admin-title { font-size: 14px; font-weight: 600; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-admin-meta { font-size: 12px; color: var(--sub); margin-top: 3px; }
.notice-admin-ops { display: flex; gap: 6px; flex: none; }
.notice-admin-ops .btn-ghost, .notice-admin-ops .btn-danger { padding: 6px 12px; font-size: 13px; }

/* ============ 公告富文本编辑器（Word 式） ============ */
.notice-editor-wrap { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.notice-editor-wrap .notice-toolbar { border-bottom: 1px solid var(--line); }
.notice-editor-wrap .notice-toolbar .ql-header select { max-width: 70px; }
#notice-content-editor { min-height: 220px; max-height: 460px; overflow-y: auto; font-size: 15px; color: var(--txt); }
#notice-content-editor .ql-editor { min-height: 220px; }
#notice-content-editor .ql-editor p { margin: 0 0 8px; }
#notice-content-editor .ql-editor h1, #notice-content-editor .ql-editor h2,
#notice-content-editor .ql-editor h3, #notice-content-editor .ql-editor h4 { margin: 12px 0 8px; line-height: 1.4; }
#notice-content-editor .ql-editor img { max-width: 100%; border-radius: 8px; }
#notice-content-editor .ql-editor ul, #notice-content-editor .ql-editor ol { padding-left: 22px; }
#notice-content-editor .ql-editor blockquote { border-left: 3px solid var(--gold); padding-left: 12px; color: var(--sub); }

/* ============ 公告放大阅读层（点击查看全文） ============ */
#notice-reader {
  position: fixed; inset: 0; z-index: 420; background: rgba(0,0,0,.66); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
#notice-reader.hidden { display: none; }
.notice-reader-dialog {
  position: relative; width: min(760px, 92vw); max-height: 88vh; background: var(--bg);
  border: 1px solid var(--line); border-radius: 16px; padding: 26px 30px 30px;
  overflow-y: auto; box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.notice-reader-title { font-size: 22px; font-weight: 700; color: var(--txt); line-height: 1.4; margin: 0 30px 6px 0; }
.notice-reader-meta { font-size: 13px; color: var(--sub); margin-bottom: 16px; }
.notice-reader-body { border-top: 1px solid var(--line); padding-top: 16px; }
.notice-rich { font-size: 15px; color: var(--txt); line-height: 1.8; word-break: break-word; }
.notice-rich p { margin: 0 0 12px; }
.notice-rich h1, .notice-rich h2, .notice-rich h3, .notice-rich h4 { margin: 16px 0 10px; line-height: 1.4; }
.notice-rich ul, .notice-rich ol { padding-left: 24px; margin: 0 0 12px; }
.notice-rich li { margin-bottom: 4px; }
.notice-rich blockquote { border-left: 3px solid var(--gold); padding-left: 14px; color: var(--sub); margin: 0 0 12px; }
.notice-rich img { max-width: 100%; border-radius: 10px; margin: 8px 0; display: block; }
.notice-rich a { color: var(--gold); text-decoration: underline; }
.notice-rich table { border-collapse: collapse; width: 100%; margin: 0 0 12px; }
.notice-rich table td, .notice-rich table th { border: 1px solid var(--line); padding: 6px 10px; }
.notice-rich strong, .notice-rich b { color: var(--txt); }
.reader-imgs { margin-top: 8px; }
.reader-imgs img { max-height: 320px; border-radius: 10px; cursor: zoom-in; }
@media (max-width: 600px) {
  .notice-reader-dialog { padding: 18px 16px 22px; }
  .notice-reader-title { font-size: 18px; }
}

/* ===================== 招品回品专区 ===================== */
/* 前台：招品回品视图布局 */
.recruit-wrap { padding: 20px 22px 30px; }
.recruit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.recruit-card { position: relative; background: transparent; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.recruit-card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.recruit-img { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: rgba(255,255,255,.03); }
.recruit-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; z-index: 1; }
.recruit-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--sub); font-size: 13px; z-index: 0; }
.recruit-no { position: absolute; top: 7px; left: 7px; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #ffe27a 0%, #f4b400 70%); color: #3a241e; font-weight: 800; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.5); z-index: 2; }
.recruit-body { padding: 11px 12px; display: flex; flex-direction: column; gap: 7px; }
.recruit-done { position: absolute; right: 7px; top: 7px; z-index: 2; background: rgba(34,150,80,.92); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; box-shadow: 0 2px 5px rgba(0,0,0,.3); }
.recruit-ops { margin-top: auto; display: flex; gap: 8px; }
.recruit-ops .btn-ghost { flex: 1; justify-content: center; padding: 6px 8px; font-size: 12px; border-radius: 7px; }
.recruit-taskid { font-size: 13px; color: #ffd680; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recruit-spu-sub { font-size: 12px; color: #b79b8a; }
.recruit-form { margin-top: auto; display: flex; gap: 8px; }
.recruit-spu-input { flex: 1; min-width: 0; background: var(--input-bg); border: 1px solid var(--line); border-radius: 8px; color: var(--txt); font-size: 13px; padding: 8px 10px; }
.recruit-spu-input:focus { outline: none; border-color: var(--gold); }
.recruit-form .btn-primary { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
.rtip { color: var(--gold); font-weight: 700; font-size: 26px; letter-spacing: 2px; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* 前台：公告角标沿用 notice-badge；topbar 共享 */
.top-tabs .tab-link.active { color: var(--gold); }

/* 后台：招品上传与管理 */
.recruit-upload { display: flex; flex-direction: column; gap: 12px; }
.rg-row { display: flex; flex-direction: column; }
.rg-row .input { max-width: 480px; }
.recruit-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.recruit-head .hint-inline { margin: 0; }
.recruit-admin-list { width: 100%; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.recruit-admin-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.recruit-admin-row:last-child { border-bottom: none; }
.recruit-admin-row:hover { background: rgba(139,115,85,.04); }
.recruit-admin-row .recruit-img { width: 74px; height: 80px; border-radius: 8px; background-size: cover; background-position: center; flex-shrink: 0; position: relative; background: linear-gradient(160deg,#1b1f2b,#0f1117); }
.recruit-admin-info { flex: 1; min-width: 220px; }
.recruit-admin-title { font-size: 14px; font-weight: 600; color: var(--txt); }
.recruit-admin-meta { font-size: 12px; color: var(--sub); margin-top: 4px; }
.recruit-admin-sub { font-size: 12px; color: var(--sub); margin-top: 4px; word-break: break-all; }
.recruit-admin-sub.hidden2 { display: none; }
.recruit-admin-ops { display: flex; gap: 8px; flex-shrink: 0; }
.recruit-admin-ops .btn-ghost, .recruit-admin-ops .btn-danger { padding: 6px 12px; font-size: 13px; }

@media (max-width: 640px) {
  .recruit-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .recruit-wrap { padding: 14px 12px 24px; }
}

/* ===== 后台招品回品：卡片网格（图片管理样式）+ 状态标签 ===== */
.dash-recruit-section{margin-top:18px;padding-top:6px}
.recruit-pre{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.recruit-pre-cell{position:relative;width:88px;height:88px;border-radius:8px;overflow:hidden;border:1px solid rgba(255,255,255,.1)}
.recruit-pre-cell img{width:100%;height:100%;object-fit:cover;display:block}
.recruit-pre-cell .btn-danger.small{position:absolute;top:3px;right:3px;min-width:20px;height:20px;line-height:18px;padding:0 4px;font-size:12px;border-radius:6px}
.recruit-filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.recruit-filter{padding:6px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.16);background:transparent;color:#cfc8bd;cursor:pointer;font-size:13px;transition:.2s}
.recruit-filter:hover{border-color:var(--gold)}
.recruit-filter.active{background:var(--gold);color:#241c10;border-color:var(--gold)}
.recruit-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.recruit-acard{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.09);border-radius:14px;overflow:hidden;transition:.25s}
.recruit-acard:hover{border-color:var(--gold);transform:translateY(-3px);box-shadow:0 10px 24px rgba(0,0,0,.35)}
.recruit-acard.sel{border-color:var(--gold);box-shadow:0 0 0 2px rgba(217,168,73,.35)}
.recruit-acard-imghold{position:relative;aspect-ratio:1/1;background:rgba(255,255,255,.03)}
.recruit-acard-img{width:100%;height:100%;object-fit:cover;display:block}
.recruit-acard-no{position:absolute;top:8px;left:8px;min-width:24px;height:24px;line-height:24px;padding:0 6px;text-align:center;background:#f4c95d;color:#241c10;font-size:13px;font-weight:700;border-radius:999px;box-shadow:0 2px 6px rgba(0,0,0,.4)}
.recruit-acard-del{position:absolute;top:6px;right:6px;width:22px;height:22px;line-height:20px;text-align:center;background:rgba(120,40,38,.85);color:#fff;border-radius:6px;cursor:pointer;font-size:15px}
.recruit-acard-del:hover{background:#c0392b}
.recruit-acard-check{position:absolute;bottom:6px;right:6px}
.recruit-acard-check input{width:16px;height:16px;accent-color:var(--gold);cursor:pointer}
.recruit-acard-body{padding:10px 12px 12px}
.recruit-acard-tid{font-size:13px;color:#e8e2d6;margin-bottom:6px;font-weight:600;word-break:break-all}
.recruit-acard-strow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:6px}
.recruit-acard-meta{font-size:12px;color:#9a927f}
.recruit-acard-tags{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px;min-height:18px}
.rcac-tag-empty{font-size:12px;color:#7c7461}
.rcac-tag-chip{font-size:11px;padding:2px 8px;border-radius:999px;background:rgba(217,168,73,.15);color:#e6c07a;border:1px solid rgba(217,168,73,.35)}
.rcac-sub-up{background:rgba(74,180,106,.16)!important;color:#5fd28a!important;border:1px solid rgba(74,180,106,.4)!important}
.recruit-acard-actions{display:flex;flex-wrap:wrap;gap:6px}
.recruit-acard-actions .btn-ghost.small,.recruit-acard-actions .rcac-tid-input{font-size:12px;padding:4px 9px}
.rcac-tid-input{flex:1 1 100%;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.14);color:#eee;border-radius:7px;font-size:12px;padding:5px 8px}
.rcac-tid-input:focus{outline:none;border-color:var(--gold)}
.recruit-chip{font-size:11px;padding:2px 8px;border-radius:999px;white-space:nowrap}
.recruit-chip.chip-draft{background:rgba(160,160,160,.16);color:#b9b3a6}
.recruit-chip.chip-pub{background:rgba(110,168,254,.16);color:#9cc2ff}
.recruit-chip.chip-sub{background:rgba(126,224,163,.16);color:#8fe6ab}
.recruit-chip.chip-bound{background:rgba(217,168,73,.2);color:#f0cf90}

/* ===== 招品回收站 ===== */
#recruit-card h2{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#recruit-card h2 .head-right{margin-left:auto}
.recruit-acard-trashtag{position:absolute;left:8px;top:34px;z-index:3;font-size:10px;line-height:1;padding:3px 7px;border-radius:999px;background:rgba(224,119,119,.18);color:#f0a0a0;pointer-events:none}
#recruit-trash-view .recruit-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* ===== 页面加载遮罩（避免登录页闪现） ===== */
.boot-splash{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#111318,#1d1f26);}
.boot-inner{display:flex;flex-direction:column;align-items:center;gap:14px;color:#f4f4f5;}
.boot-mark{font-size:38px;color:var(--accent,#d9b98a);animation:bootPulse 1.3s ease-in-out infinite;}
.boot-text{font-size:14px;letter-spacing:2px;color:#9ca3af;}
@keyframes bootPulse{0%,100%{opacity:.35;}50%{opacity:1;}}
.boot-splash.hidden{display:none;}

/* ===== 极简时尚 LOGO：TREND BANK ===== */
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--gold); color: #fff; position: relative;
  letter-spacing: 1px; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 16px rgba(139,115,85,.25);
}
.logo-mark .logo-dot {
  position: absolute; top: 6px; right: 6px; width: 5px; height: 5px;
  border-radius: 50%; background: rgba(255,255,255,.85);
}
.logo-mark .logo-word { line-height: 1; }
.logo-sm { width: 26px; height: 26px; border-radius: 6px; font-size: 11px; box-shadow: none; vertical-align: middle; }
.logo-sm .logo-dot { top: 4px; right: 4px; width: 3px; height: 3px; }
.brand-sm { display: inline-flex; align-items: center; gap: 9px; }
.brand-sm .logo-mark { flex: none; }
.brand-sm > span:last-child { color: var(--txt); }

/* ============================================================
 * 大牌简约层（高级时装品牌官网质感：黑白灰米白 / 大量留白 /
 * 发丝细线 / 克制的字距与字号 / 柔和弥散光影）
 * ============================================================ */
:root {
  --bg: #f6f5f3;          /* 暖灰白 */
  --bg2: #ffffff;
  --card: #ffffff;
  --line: #e7e4de;        /* 发丝线 */
  --txt: #1b1b1b;
  --sub: #8b8b8b;
  --gold: #9c8b74;        /* 低调暖杏，仅点缀 */
  --gold2: #b6a892;
  --shade: #f0efec;
  --ink: #141414;
  --shadow: 0 24px 60px rgba(20,20,20,.07);
}
* { font-feature-settings: "tnum" 0; }
body {
  background: var(--bg);
  color: var(--txt);
}
a { color: var(--gold); }
::selection { background: rgba(156,139,116,.2); }

/* ---------- 顶部导航：米白底 + 发丝底线 + 小号大写导航 ---------- */
.topbar {
  background: rgba(246,245,243,.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); box-shadow: none;
}
.topbar-inner { padding: 14px 20px; }
.topbar .brand-sm, .topbar .brand-sm > span:last-child { color: var(--txt); font-weight: 600; }
.tab-link, .trend-filter-btn {
  background: transparent; color: #9a9894; border: none; border-radius: 0;
  text-transform: uppercase; letter-spacing: 1.6px; font-size: 12.5px; font-weight: 500;
  padding: 6px 2px; margin: 0 12px; position: relative;
}
.tab-link:hover, .trend-filter-btn:hover { color: var(--txt); }
.tab-link.active, .trend-filter-btn.active {
  background: transparent; color: var(--txt); font-weight: 600; border: none;
}
.tab-link.active::after, .trend-filter-btn.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: var(--txt);
}
.topbar .topbar-actions .btn-ghost { color: var(--sub); }

/* ---------- 登录卡 / 面板：纯白大留白 + 发丝边 + 顶部细杏线 ---------- */
.auth-card, .panel-card {
  border-radius: 14px; border: 1px solid var(--line);
  box-shadow: var(--shadow); position: relative;
}
.auth-card::before, .panel-card::before {
  content: ""; display: block; height: 1px; width: 42px; margin: 0 auto 20px;
  background: var(--gold);
}
.auth-form input {
  border-radius: 2px; border: 1px solid #dcd8d0; background: #fbfaf8;
  padding: 14px 18px; letter-spacing: .2px;
}
.auth-form input:focus { border-color: var(--txt); box-shadow: 0 0 0 3px rgba(20,20,20,.05); }

/* ---------- 按钮：细窄、大写宽字距、黑实心 / 黑描边 ---------- */
.btn-primary, .btn-ghost, .btn-danger, .btn-block {
  border-radius: 2px; text-transform: uppercase; letter-spacing: 1.6px;
  font-weight: 500; font-size: 12px; padding: 9px 18px;
}
.btn-primary { background: var(--ink); color: #f6f5f3; border: 1px solid var(--ink); }
.btn-primary:hover { background: #000; box-shadow: 0 10px 26px rgba(20,20,20,.18); transform: none; }
.btn-ghost { border: 1px solid #c8c4bc; color: var(--txt); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: transparent; }
.btn-danger { border: 1px solid #d5c9c4; color: #a8605b; }
.btn-danger:hover { background: rgba(168,96,91,.06); }
.auth-form .btn-primary { background: var(--ink); color: #f6f5f3; border-color: var(--ink); }

/* ---------- 标签 chip / 类目：发丝边药丸 + 大写窄字距 ---------- */
.cat-tab, .tag-chip, .mtag-chip, .trend-tag, .tagdef-chip {
  border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  text-transform: uppercase; letter-spacing: .8px; font-size: 12px; color: var(--sub);
  padding: 6px 14px;
}
.cat-tab:hover, .tag-chip:hover, .mtag-chip:hover { color: var(--txt); border-color: #c8c4bc; }
.cat-tab.active, .tag-chip.active {
  background: var(--ink); color: #f6f5f3; border-color: var(--ink); font-weight: 500;
}
.mtag-chip:has(input:checked) { background: var(--ink); color: #f6f5f3; border-color: var(--ink); }
.tag-chip .tc-count {
  background: transparent; color: inherit; border: none; margin-left: 6px;
  font-variant-numeric: tabular-nums; opacity: .6;
}

/* ---------- 卡片 / 网格：纯白大留白 + 发丝边 + 柔和弥散影 ---------- */
.cell, .smart-card, .trend-card.tc-grid, .trend-card, .trend-admin-row,
.cat-order-item, .recruit-acard, .trend-card, .dropper {
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  box-shadow: 0 10px 30px rgba(20,20,20,.05);
}
.cell:hover, .trend-card:hover, .trend-card.tc-grid:hover {
  border-color: #c9c5bd; box-shadow: 0 22px 50px rgba(20,20,20,.11); transform: translateY(-3px);
}
.cell .holder, .smart-card .holder, .recruit-acard .holder,
.recruit-acard .recruit-thumb { background: var(--shade); }

/* ---------- 侧边栏：纯白 + 发丝边 + 顶部细杏线 + 小号大写标题 ---------- */
.sidebar, .admin-side {
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  box-shadow: 0 10px 30px rgba(20,20,20,.04); position: relative;
  border-top: 2px solid var(--gold);
}
.side-head, .tbs-title {
  text-transform: uppercase; letter-spacing: 2px; font-weight: 500;
  color: var(--txt); font-size: 12px; padding-bottom: 12px;
}
.cat-menu-item, .nav-item {
  border-radius: 999px; text-transform: none; letter-spacing: .2px;
}
.cat-menu-item:hover, .nav-item:hover { color: var(--txt); background: var(--shade); }
.cat-menu-item.active {
  background: var(--ink); color: #f6f5f3; font-weight: 500;
}
.nav-item.active { background: var(--ink); color: #f6f5f3; border-color: var(--ink); }

/* ---------- 趋势封面 / 深色预览：中性米灰代替工业黑网格 ---------- */
.trend-card-cover, .trend-card-cover.img {
  background: linear-gradient(150deg,#f0eeea 0%,#e7e4de 100%);
}
.tcov-ic { color: var(--gold); font-weight: 400; letter-spacing: 4px; font-size: 24px; }
.pdf-stage, .pdf-frame, .lightbox { background: #151515; }

/* ---------- 表格：发丝线 + 小号大写表头 ---------- */
table { border-color: var(--line); }
th { text-transform: uppercase; letter-spacing: 1px; font-size: 11px; color: var(--sub); background: transparent; font-weight: 500; }

/* ---------- 招品序号徽章：极简细字号 ---------- */
.recruit-sq {
  border-radius: 999px; background: var(--ink); color: #f6f5f3;
  font-variant-numeric: tabular-nums; font-weight: 500; font-size: 12px; letter-spacing: .5px;
}

/* ---------- LOGO 精修：浅色发丝线极简 + 深灰文字 + 细杏点 ---------- */
.logo-mark {
  background: #ffffff; color: var(--txt); border-radius: 8px;
  border: 1px solid var(--line); letter-spacing: 2px; font-weight: 400; font-size: 16px;
  box-shadow: 0 4px 14px rgba(20,20,20,.05);
}
.logo-mark .logo-dot { background: var(--gold); }
.logo-sm { border-radius: 5px; font-size: 11px; box-shadow: none; }
.boot-splash { background: #f6f5f3; }
.boot-splash .boot-text { color: var(--txt); letter-spacing: 5px; font-weight: 500; font-size: 14px; }

/* ============ 前台登录卡：商标展示头像 ============ */
.auth-card .brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.trademark-avatar {
  display: flex; align-items: center; justify-content: center; margin: 6px auto 2px;
  padding: 10px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(20,20,20,.04);
}
.trademark-avatar svg { display: block; border-radius: 999px; }

/* 图片管理卡片：顶部操作行（最左选中此行，最右删除） */
#manage-grid .mgr-topbar{
  position:absolute; top:6px; left:6px; right:6px; z-index:3;
  display:flex; align-items:center; justify-content:space-between; gap:6px;
  pointer-events:none;
}
#manage-grid .mgr-topbar > *{ pointer-events:auto; }
#manage-grid .mgr-selrow{
  padding:3px 10px; border-radius:999px;
  border:1px solid rgba(0,0,0,.10); background:rgba(255,255,255,.88); backdrop-filter:blur(3px);
  color:var(--txt); font-size:11px; line-height:1.5; cursor:pointer;
  transition:all .18s; box-shadow:0 1px 4px rgba(0,0,0,.08);
}
#manage-grid .mgr-selrow:hover{ border-color:#9c8b74; color:#7a6b52; }
#manage-grid .mgr-selrow.on{
  border-color:#9c8b74; background:rgba(156,139,116,.16);
  color:#7a6b52; font-weight:600;
}
#manage-grid .mgr-del{
  position:static; padding:3px 10px; border-radius:999px;
  font-size:11px; line-height:1.5; background:rgba(255,255,255,.88); backdrop-filter:blur(3px);
  box-shadow:0 1px 4px rgba(0,0,0,.08);
}

/* 智能打标：全屏铺满 */
#smart-modal.fullscreen { padding: 0 !important; }
#smart-modal.fullscreen .smart-modal-box {
  width: 100% !important; max-width: none !important; height: 100vh !important;
  max-height: 100vh !important; border-radius: 0 !important; display: flex; flex-direction: column;
}
#smart-modal.fullscreen .smart-pools { flex: 1 1 auto; overflow: auto; }
#smart-modal.fullscreen .smart-pool-grid { flex: 1 1 auto; height: auto; min-height: 0; }
/* 智能打标：全选本池按钮 */
.smart-select-all {
  background: #9c8b74; color: #fff; border: none; border-radius: 8px;
  padding: 6px 14px; font-size: 12px; cursor: pointer; transition: opacity .2s;
}
.smart-select-all:hover { opacity: .88; }
#smart-fs.btn-ghost { border: 1px solid #ddd; background: #fff; color: #555; border-radius: 8px; padding: 5px 12px; cursor: pointer; }
#smart-fs.btn-ghost:hover { border-color: #9c8b74; color: #9c8b74; }

/* ===== 智能打标：图册（中间栏） ===== */
.smart-albums { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-height: 0; background: var(--card); }
.smart-albums-head { padding: 9px 12px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.04); border-bottom: 1px solid var(--line); letter-spacing: .5px; flex: 0 0 auto; }
.smart-albums-head .sp-count { margin-left: 6px; font-weight: 400; color: var(--sub); }
.smart-albums-list { flex: 1 1 auto; min-height: 0; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.smart-album-group { font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: 1px; margin: 4px 2px 2px; padding-top: 6px; border-top: 1px dashed var(--line); }
.smart-album-group:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.smart-album { border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: rgba(255,255,255,.02); cursor: grab; transition: border-color .15s, background .15s; }
.smart-album:hover { border-color: var(--gold); background: rgba(139,115,85,.06); }
.smart-album.drop-over { outline: 2px dashed var(--gold); outline-offset: -4px; background: rgba(139,115,85,.10); }
.smart-album-thumb { width: 100%; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; }
.smart-album-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.smart-album-ph { font-size: 12px; color: var(--sub); padding: 8px; text-align: center; line-height: 1.4; word-break: break-all; }
/* 新增图册按钮（图册栏头部） */
.smart-album-add { margin-left: auto; flex: 0 0 auto; padding: 3px 10px; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.03); color: var(--sub); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.smart-album-add:hover { border-color: var(--gold); color: var(--gold); background: rgba(139,115,85,.06); }
/* 图册删除按钮（右上角 ×） */
.smart-album { position: relative; }
.smart-album-del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 1; font-size: 13px; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; z-index: 2; opacity: 0; transition: opacity .15s, background .15s; }
.smart-album:hover .smart-album-del { opacity: 1; }
.smart-album-del:hover { background: #d9534f; }
.smart-album-body { padding: 6px 3px 2px; }
.smart-album-name { font-size: 12px; color: var(--txt); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-album-count { font-size: 11px; color: var(--sub); margin-top: 3px; }
.smart-album.active { border-color: var(--gold); background: rgba(139,115,85,.10); }
.smart-album.empty { opacity: .55; }
/* 池内一行：卡片横向排 + 行末"全选本行"按钮固定在行最右侧 */
.smart-row { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; flex-wrap: nowrap; }
.smart-row-sel { flex: 0 0 auto; align-self: center; margin-left: auto; padding: 6px 8px; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.03); color: var(--sub); cursor: pointer; white-space: nowrap; writing-mode: vertical-rl; letter-spacing: 2px; line-height: 1; transition: border-color .15s, background .15s, color .15s; }
.smart-row-sel:hover { border-color: var(--gold); color: var(--gold); background: rgba(139,115,85,.06); }

/* 全选本池去标按钮（左池） */
#smart-pool-done .smart-pool-head { display: flex; align-items: center; }
#smart-pool-done .smart-pool-head .sp-count { margin-right: auto; }


/* ================= 智能打标内上传（入口卡=右池首位，按钮/进度常驻右池头部） ================= */
#smart-pool-undone .smart-pool-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#smart-pool-undone .smart-pool-head .sp-count { margin-right: 8px; }
.su-spacer { flex: 1 1 auto; }
.su-cat { min-width: 110px; max-width: 150px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--txt); font-size: 12px; }
.sm-upload { height: 30px; padding: 0 14px; font-size: 12px; white-space: nowrap; }
.sm-progress { flex: 1 1 120px; max-width: 200px; height: 8px; }
/* 上传入口卡（右池首位） */
.smart-up-entry .holder { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.smart-up-entry:hover { border-color: var(--gold); }
.smart-up-entry .up-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); }
.smart-up-entry .up-plus { font-size: 30px; line-height: 1; color: var(--gold); }
.smart-up-entry .up-txt { font-size: 13px; font-weight: 600; color: var(--txt); }
.smart-up-entry .up-sub { font-size: 11px; color: var(--muted); }
/* 待传缩略图卡 */
.smart-up-thumb { position: relative; }
.smart-up-thumb .holder { cursor: default; }
.smart-up-thumb .holder img { object-fit: cover; }
.smart-up-thumb .x { position: absolute; top: 6px; right: 6px; z-index: 4; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; line-height: 20px; cursor: pointer; padding: 0; }
.smart-up-thumb .x:hover { background: #c0392b; }
/* 进度条平滑过渡 */
.smart-up-head .progress, .smart-progress .progress-bar { transition: width .3s ease; }
.smart-progress.hidden { display: none; }

/* 智能打标：顶部标签栏"编辑/改名"按钮 */
.smart-tag { display: inline-flex; align-items: center; gap: 4px; }
.smart-tag-name { line-height: 1.2; }
.smart-tag-edit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; font-size: 11px; line-height: 1;
  border-radius: 4px; color: var(--sub); background: transparent;
  opacity: 0; transition: opacity .15s, color .15s, background .15s; cursor: pointer;
}
.smart-tag:hover .smart-tag-edit { opacity: 1; }
.smart-tag-edit:hover { color: var(--gold); background: rgba(139,115,85,.15); }

/* 智能打标：图册"编辑/改名"按钮 */
.smart-album-name { display: flex; align-items: center; gap: 4px; }
.smart-album-edit {
  flex: none; width: 14px; height: 14px; font-size: 11px; line-height: 1;
  border: none; border-radius: 4px; color: var(--sub); background: transparent;
  opacity: 0; transition: opacity .15s, color .15s, background .15s; cursor: pointer; padding: 0;
}
.smart-album:hover .smart-album-edit { opacity: 1; }
.smart-album-edit:hover { color: var(--gold); background: rgba(139,115,85,.15); }

/* 智能打标：图片卡片删除按钮（右上角） */
.smart-card-del {
  position: absolute; top: 4px; right: 4px; z-index: 3;
  width: 20px; height: 20px; line-height: 1; font-size: 14px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  opacity: 0; transition: opacity .15s, background .15s; cursor: pointer;
}
.smart-card:hover .smart-card-del { opacity: 1; }
.smart-card-del:hover { background: #d9534f; }

/* 标签管理面板头部：标题靠左 + 「返回智能打标」按钮靠右 */
.tag-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px;}
.tag-card-head h2{margin:0;}
.tag-card-head .btn-ghost{flex:0 0 auto;}
/* ============================================================
 * 免责协议弹窗 + 底部协议入口
 * ============================================================ */
.site-footer{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;padding:16px 20px 20px;color:var(--sub);font-size:12px;background:var(--bg);border-top:1px solid var(--line);}
.site-footer .sf-copy{letter-spacing:.5px;}
.site-footer .sf-links{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.site-footer .sf-muted{color:var(--sub);}
.site-footer .sf-sep{color:var(--line);}
.site-footer .legal-link{color:var(--gold);cursor:pointer;}
.site-footer .legal-link:hover{text-decoration:underline;}
.legal-overlay{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;background:rgba(30,26,20,.62);backdrop-filter:blur(3px);padding:20px;}
.legal-dialog{width:min(680px,100%);max-height:88vh;display:flex;flex-direction:column;background:var(--bg2);border:1px solid var(--line);border-radius:18px;box-shadow:0 22px 60px rgba(30,26,20,.32);overflow:hidden;}
.legal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px 12px;border-bottom:1px solid var(--line);}
.legal-title{margin:0;font-size:19px;font-weight:700;color:var(--txt);letter-spacing:.5px;}
.legal-close{background:none;border:none;color:var(--sub);font-size:26px;line-height:1;cursor:pointer;padding:0 6px;border-radius:6px;}
.legal-close:hover{color:var(--gold);}
.legal-tabs{display:flex;gap:8px;padding:12px 22px 0;flex-wrap:wrap;}
.legal-tab{padding:7px 15px;border:1px solid var(--line);background:var(--bg);color:var(--sub);border-radius:8px;font-size:13px;cursor:pointer;}
.legal-tab:hover{border-color:var(--gold);color:var(--gold);}
.legal-tab.active{background:linear-gradient(135deg,var(--gold),var(--gold2));color:#2c2c2c;border-color:transparent;font-weight:600;}
.legal-body{flex:1;overflow-y:auto;padding:16px 22px;font-size:14px;line-height:1.8;color:var(--txt);}
.legal-panel{display:none;}
.legal-panel.active{display:block;}
.legal-panel h3{margin:0 0 12px;font-size:15px;color:var(--gold);}
.legal-panel h4{margin:14px 0 6px;font-size:13.5px;font-weight:700;color:var(--txt);letter-spacing:.3px;}
.legal-panel p{margin:0 0 10px;}
.legal-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:14px 22px 18px;border-top:1px solid var(--line);background:var(--bg);}
.legal-agree{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--sub);cursor:pointer;flex:1;min-width:220px;}
.legal-agree input[type=checkbox]{accent-color:var(--gold);width:16px;height:16px;cursor:pointer;flex:0 0 auto;}
.legal-agree span{line-height:1.5;}
.legal-foot .btn-primary{flex:0 0 auto;}
@media (max-width:640px){.legal-foot{flex-direction:column;align-items:stretch;}.legal-foot .btn-primary{width:100%;}.legal-dialog{max-height:92vh;}}
@keyframes lshake{0%,100%{transform:translateX(0);}25%{transform:translateX(-5px);}50%{transform:translateX(5px);}75%{transform:translateX(-3px);}}
.legal-foot .btn-primary.shake{animation:lshake .45s ease;}

/* ===== 数据导出 ===== */
.export-toolbar { display:flex; align-items:center; gap:12px; margin:6px 0 14px; flex-wrap:wrap; }
.export-excel-btn { background:var(--gold); color:#fff; border:1px solid var(--gold); }
.export-excel-btn:hover { filter:brightness(1.05); }
.export-filter { display:flex; gap:14px; flex-wrap:wrap; align-items:flex-end; margin-bottom:14px; }
.export-cat { display:flex; flex-direction:column; gap:4px; font-size:12px; color:#5b5b5b; }
.export-cat select, .export-dim select { padding:5px 8px; border:1px solid #d9d9d9; border-radius:6px; background:#fff; color:#2c2c2c; }
.export-dims { display:flex; gap:14px; flex-wrap:wrap; flex:1; }
.export-dim { display:flex; flex-direction:column; gap:4px; font-size:12px; color:#5b5b5b; }
.export-dim select { min-width:120px; }
.export-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.export-item { background:#fff; border:1px solid #eee; border-radius:8px; overflow:hidden; }
.export-item img { width:100%; aspect-ratio:3/4; object-fit:contain; background:#fafafa; }
.export-item-t { display:flex; justify-content:space-between; gap:6px; padding:6px 8px 0; font-size:12px; }
.export-item-n { color:#2c2c2c; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.export-item-cat { color:var(--gold); flex-shrink:0; }
.export-item-l { padding:4px 8px 8px; font-size:11px; color:#888; line-height:1.4; }
