    /* ============================================
       管理页（风格与资源页/导航页统一：蓝色系）
       ============================================ */
    * {
      -webkit-tap-highlight-color: transparent;
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
    }

    :root {
      --blue1: #1E88E5;
      --blue2: #64B5F6;
      --blue:  #1688FF;
      --red:   #ff4444;
      --green: #01C000;
      /* R50：暗色相关变量统一移至 ui-common.css（含 [data-theme=dark] 暗色值），此处不再重复定义 */
    }
    /* R49：暗色变量块为死代码（0 处引用），已删，勿再空挂 */
    @keyframes pageFadeIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .logo-enter { animation: logoFadeIn 0.8s ease forwards; }
    @keyframes logoFadeIn {
      from { opacity: 0; transform: scale(0.8); }
      to { opacity: 1; transform: scale(1); }
    }

    html, body { background: var(--bg-page); color: var(--text); max-width: 100%; overflow-x: hidden; overflow-y: scroll; }
    *, *::before, *::after { min-width: 0; }
    img, video, svg { max-width: 100%; }
    .container, .panel, .modal-box, .form { min-width: 0; }
    table { max-width: 100%; }
    pre, .rte-editor { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
    /* 注意：不要在 body/html 上使用 transform/opacity 动画，否则会使其成为 fixed 弹窗的包含块，
       导致弹窗遮罩无法相对视口定位而错位。淡入动画只加在内部视图上（弹窗是 body 直接子元素，不受影响）。 */
    #loginView, #mainView { animation: pageFadeIn 0.4s ease; }
    input, textarea, select { font-size: 15px; }
    input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue1); cursor: pointer; flex-shrink: 0; }
    label:has(input[type="checkbox"]) { user-select: none; }
    button { cursor: pointer; user-select: none; }

    /* ---------- 登录页 ---------- */
    .login-view {
      min-height: 100vh;
      background: linear-gradient(180deg, var(--blue1) 0%, var(--blue2) 48%, #BBDEFB 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px 18px;
    }
    .login-card {
      background: var(--card-bg);
      border-radius: 14px;
      padding: 30px 26px 24px;
      width: 100%;
      max-width: 360px;
      text-align: center;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    }
    .login-logo-link {
      border-radius: 50%;
      overflow: hidden;
      clip-path: circle(50%);
      width: fit-content;
      margin-left: auto;
      margin-right: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      margin-bottom: 12px;
    }
    .login-logo {
      width: 72px; height: 72px; opacity: 0; /* 进场前整体隐藏：边框/背景/图片同步进场 */
      margin: 0 auto;
      border-radius: 50%;
      overflow: hidden;
      background: linear-gradient(180deg, var(--blue1) 0%, var(--blue2) 100%);
      background: var(--bg-light);
      background: transparent;
      color: #fff; font-size: 34px; font-weight: 700;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 0 0 2px rgba(255,255,255,0.3), 0 4px 14px rgba(30,80,140,0.22); border: 3px solid #fff; box-sizing: border-box;
      /* animation triggered by JS onload */
      transition: transform 0.12s ease, box-shadow 0.12s ease;
    }
    .login-logo-link:active .login-logo {
      transform: scale(0.9);
      opacity: 0.8;
    }
    .login-logo-link:hover .login-logo {
      box-shadow: 0 0 0 3px rgba(255,255,255,0.45);
    }
    .login-logo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .login-card h1 { font-size: 20px; letter-spacing: 1.5px; margin-bottom: 6px; }
    .login-tip { font-size: 13px; color: var(--text-faint); margin-bottom: 16px; }
    .login-card .input {
      width: 100%; height: 44px;
      border: 1px solid var(--border); border-radius: 8px;
      padding: 0 14px; margin-bottom: 12px; outline: none;
    }
    .login-card .input:focus { border-color: var(--blue1); }

    .btn-blue {
      width: 100%; height: 44px;
      border: none; border-radius: 8px;
      background: linear-gradient(180deg, var(--blue1) 0%, var(--blue2) 100%);
      color: #fff; font-size: 16px; font-weight: 600;
      letter-spacing: 1.2px; margin-bottom: 10px;
    }
    .btn-blue, .modal-inner-btn { background: var(--blue1) !important; }
    .login-foot { font-size: 12px; color: var(--text-faint); line-height: 1.6; }

    /* ---------- 主视图 ---------- */
    .topbar {
      position: sticky; top: 0; z-index: 100;
      transition: transform .28s ease, box-shadow .28s ease; will-change: transform;
    }
    .topbar.nav-hidden { transform: translateY(-100%); box-shadow: none; }
    .back-top {
      position: fixed; right: 24px; bottom: 30px; z-index: 200;
      width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
      background: var(--blue1); color: #fff;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 4px 14px rgba(30,136,229,0.4);
      opacity: 0; visibility: hidden; transform: translateY(10px);
      transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s;
    }
    .back-top.show { opacity: 0.72; visibility: visible; transform: translateY(0); }
    .back-top:hover { opacity: 1; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(30,136,229,0.5); }
    .back-top:active { transform: scale(0.9); }
    html, body { overscroll-behavior: none; }
    @media (hover: hover) and (pointer: fine) { html, body { overscroll-behavior: auto; } }
    .pull-refresh { position: fixed; top: 0; left: 0; right: 0; height: 0; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; z-index: 300; transition: height .2s ease; pointer-events: none; background: transparent; }
    .pull-refresh.show { height: 46px; }
    .pull-refresh-text { font-size: 12px; color: var(--blue1); background: rgba(255,255,255,.94); border: 1px solid var(--blue2); border-radius: 20px; padding: 6px 16px; display: flex; align-items: center; gap: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
    .pull-refresh-icon { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--blue2); border-top-color: var(--blue1); border-radius: 50%; animation: prspin .8s linear infinite; }
    @keyframes prspin { to { transform: rotate(360deg); } }
    .topbar {
      background: linear-gradient(180deg, var(--blue1) 0%, var(--blue2) 100%);
      box-shadow: 0 2px 10px rgba(30, 136, 229, 0.35);
    }
    .topbar-inner {
      max-width: 1200px; margin: 0 auto;
      padding: 10px 16px;
      display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    }
    .topbar-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      color: #fff;
      font-size: 19px;
      font-weight: 700;
      letter-spacing: 1.2px;
      white-space: nowrap;
    }
    .topbar-logo-link {
      width: fit-content; opacity: 0; /* 进场前整体隐藏 */
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      transition: all 0.12s ease;
      text-decoration: none;
    }
    .topbar-logo-link:active {
      transform: scale(0.9);
      opacity: 0.8;
    }
    .topbar-logo-link:hover .topbar-logo {
      box-shadow: 0 0 0 3px rgba(255,255,255,0.45);
    }
    .topbar-logo {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      background: transparent; box-sizing: border-box; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.3), 0 4px 14px rgba(30,80,140,0.22); transition: transform 0.12s ease, box-shadow 0.12s ease; flex-shrink: 0;
    }
    .tabs { display: flex; gap: 6px; flex: 1; }
    /* .tab 按钮样式已抽入 ui-common.css 全站公共组件（与资源页顶栏咨询客服/分享同一份，零复制） */
    .topbar-right { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; }
    /* R36：退出按钮专用类——之前误用 .tab（无 data-tab），点击触发 switchTab(undefined) 把主内容切成空白。
       样式与顶栏 tab 同观感（半透明白胶囊），但语义独立：只弹退出确认框，不参与 tab 切换 */
    .logout-btn {
      border: none; background: rgba(255, 255, 255, 0.18);
      color: #fff; padding: 0 16px; height: 38px;
      display: inline-flex; align-items: center; justify-content: center;
      box-sizing: border-box; border-radius: 18px;
      font-size: 14px; white-space: nowrap; line-height: 1.2;
      transition: all 0.2s; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .logout-btn:hover { transform: scale(0.97); opacity: 0.9; }
    .logout-btn:active { background: #fff; color: var(--blue1); transform: scale(0.94); }
    /* R39：退出确认弹窗打开期间退出键变白——复用资源页顶栏分享键的 .active 白底蓝字观感（ui-common.css .tab.active） */
    .logout-btn.active { background: #fff; color: var(--blue1); font-weight: 600; transform: none; opacity: 1; }
    .container { max-width: 1200px; margin: 0 auto; padding: 16px; }
    .toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; }
    .tb-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
    .tb-row2 select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--card-bg); color: var(--text); }
    /* .view-btn 按钮本体已抽入 ui-common.css 全站公共组件（与资源页同一份，零复制），
       公共样式已按"融入背景"参数化：管理页白底直接透明融入+激活蓝底白字，资源页由 .on-blue 切白系。 */
    @keyframes viewSwitch { from { opacity: 0.4; transform: scale(0.985); } to { opacity: 1; transform: scale(1); } }
    .view-switch-anim { animation: viewSwitch 0.18s ease; }
    .btn-blue, .row-btn, .variant-add { display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; }
    .toolbar .btn-blue { width: auto; height: 40px; padding: 0 20px; margin: 0; display: inline-flex; align-items: center; justify-content: center; }
    .toolbar-hint { font-size: 13px; color: var(--text-faint); }
    .admin-search {
      position: relative;
      flex: 1;
      max-width: 280px;
    }
    .admin-search svg {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      width: 16px;
      height: 16px;
      color: var(--text-faint);
      pointer-events: none;
    }
    .admin-search input {
      width: 100%;
      height: 38px;
      border: 1px solid var(--border);
      border-radius: 19px;
      padding: 0 14px 0 36px;
      font-size: 13px;
      outline: none;
      background: var(--card-bg);
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .admin-search input:focus {
      border-color: var(--blue1);
      box-shadow: 0 0 0 3px rgba(30,136,229,0.1);
    }

    /* ---------- 资源列表 ---------- */
    @keyframes rowIn { from { opacity: 0.9; } to { opacity: 1; } }
    .product-row {
      background: var(--card-bg); border-radius: 12px;
      padding: 12px 14px; margin-bottom: 10px;
      display: flex; align-items: center; gap: 14px;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
      transition: all 0.10s ease;
      cursor: grab; animation: rowIn 0.15s ease;
    }
    .product-row:active { cursor: grabbing; }
    .cat-row.dragging, .ann-item.dragging { opacity: 0.4; transform: scale(0.98); }
    .cat-row.drag-over, .ann-item.drag-over { border-top: 3px solid var(--blue1); margin-top: -3px; }
    .drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; background: rgba(30,136,229,0.12); color: #1E88E5; font-size: 13px; cursor: grab; user-select: none; flex-shrink: 0; touch-action: none; }
    .drag-handle:hover { background: rgba(30,136,229,0.2); }
    .drag-handle:active { cursor: grabbing; }
    .product-row.dragging {
      opacity: 0.4;
      transform: scale(0.98);
    }
    .product-row.drag-over {
      border-top: 3px solid var(--blue1);
      margin-top: -3px;
    }
    .product-row .thumb {
      width: 96px; height: 96px; border-radius: 10px;
      object-fit: cover; background: var(--bg-light); flex-shrink: 0;
    }
    .product-row .info { flex: 1; min-width: 0; }
    .product-row .p-title {
      font-size: 15px; font-weight: 600; color: var(--text);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .product-row .p-sub {
      font-size: 12px; color: var(--text-faint); margin-top: 3px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .product-row .p-sub .p-desc { color: var(--blue1); } /* R24：简介字体颜色复用资源页弹窗简介的蓝色 */
    .badge {
      display: inline-block; padding: 2px 10px; border-radius: 10px;
      font-size: 12px; flex-shrink: 0;
    }
    .badge.on { background: #e6f7e6; color: var(--green); }
    .badge.off { background: #f2f2f2; color: var(--text-faint); }

    /* 显示/隐藏直接切换下拉（显示/隐藏，与分类管理同款，两字宽度一致） */
    .status-select {
      flex-shrink: 0; padding: 6px 10px; border-radius: 14px; font-size: 12px; font-weight: 600;
      border: 1px solid transparent; cursor: pointer; outline: none; transition: all 0.10s ease;
    }
    .status-select.status-online { background: #e6f7e6; color: var(--green); border-color: #bfe6bf; }
    .status-select.status-offline { background: #f2f2f2; color: #777; border-color: #e0e0e0; }
    .status-select.status-hidden { background: #fff4e5; color: #e8890c; border-color: #ffe0b3; }
    .status-select:hover { transform: scale(1.04); }
    .status-select:active { transform: scale(0.96); }    .product-row .select-picker .cat-picker-display { width: auto; min-height: 0; border-radius: 6px; padding: 6px 12px; font-size: 13px; color: var(--text-light); }

    .product-row .p-ops { display: flex; align-items: center; gap: 12px; }    .row-btn {
      border: 1px solid var(--border); background: var(--card-bg); color: var(--text-light);
      padding: 6px 12px; border-radius: 6px; font-size: 13px; flex-shrink: 0;
    }
    .row-btn.danger { color: var(--red); border-color: #ffc8c8; }
    .empty { text-align: center; color: var(--text-faint); padding: 60px 0; font-size: 14px; }

    .prod-fade { animation: prodFade 0.22s ease; }
    @keyframes prodFade { from { opacity: 0.4; } to { opacity: 1; } }
    /* 卡片视图 */
    #productList.card-view {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 14px;
    }
    @media (max-width: 1200px) { #productList.card-view { grid-template-columns: repeat(4, 1fr); } }
    @media (max-width: 900px)  { #productList.card-view { grid-template-columns: repeat(3, 1fr); } }
    @media (max-width: 600px)  {
      #productList.card-view { grid-template-columns: repeat(2, 1fr); gap: 10px; }
      #productList.card-view .product-row .p-ops { flex-wrap: wrap; gap: 8px; }
      /* R35：修复手机窄卡片（约178px）按钮被 overflow:hidden 裁掉看不见——三等分平铺，每颗都完整露出 */
      #productList.card-view .product-row .p-ops .row-btn { flex: 1 1 0; min-width: 0; padding: 6px 2px; font-size: 12px; box-sizing: border-box; text-align: center; }
    }
    #productList.card-view .product-row {
      flex-direction: column;
      align-items: stretch;
      padding: 0;
      overflow: hidden;
      gap: 0;
      position: relative;
    }
    #productList.card-view .product-row .row-check {
      position: absolute;
      top: 8px;
      left: 8px;
      z-index: 2;
      width: 20px;
      height: 20px;
    }
    /* R28：按用户要求回退 R26 的把手实底色改动——恢复完全继承列表模式默认 .drag-handle 样式（半透明蓝底），仅保留右上角镶嵌定位；封面图顶到卡片顶部不变 */
    #productList.card-view .product-row .drag-handle {
      position: absolute;
      top: 8px;
      right: 8px;
      z-index: 2;
      margin: 0;
    }
    #productList.card-view .product-row .thumb {
      width: 100%;
      height: auto;
      aspect-ratio: 3 / 2;
      border-radius: 0;
      border-radius: 0;
    }
    #productList.card-view .product-row .info {
      flex-basis: 100%;
      padding: 10px 12px 6px;
    }
    #productList.card-view .product-row .p-ops {
      width: 100%;
      display: flex;
      gap: 12px;
      padding: 0 12px 10px;
      justify-content: flex-start;
    }
    #productList.card-view .product-row .p-ops .row-btn {
      flex: 1;
      text-align: center;
    }
    #productList.card-view .product-row .select-picker {
      margin: 2px 12px 10px; align-self: flex-start; width: auto;
    }

    /* ---------- 统计 ---------- */
    .stat-cards {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 14px; margin-bottom: 18px;
    }
    .stat-card {
      background: linear-gradient(180deg, var(--blue1) 0%, var(--blue2) 100%);
      color: #fff; border-radius: 12px; padding: 18px;
      text-align: center; box-shadow: 0 4px 12px rgba(30, 136, 229, 0.25);
      /* R71：卡片内容(数字/标签/环比)在框内垂直居中——不管开不开对比上期，数字都处于卡中央 */
      display: flex; flex-direction: column; justify-content: center; align-items: center;
    }
    .stat-card .num { font-size: 30px; font-weight: 700; }
    .stat-card .label { font-size: 13px; opacity: 0.85; margin-top: 4px; }
    /* R57：环比「较上期」小字——涨绿降红（蓝底上用亮色变体保证可读） */
    .stat-card .delta { font-size: 12px; margin-top: 3px; font-weight: 500; }
    .stat-card .delta.up { color: #8df7b0; }
    .stat-card .delta.down { color: #ffb1b1; }
    .stat-card .delta.flat { color: rgba(255, 255, 255, 0.78); }
    .stat-table-wrap {
      background: var(--card-bg); border-radius: 12px; padding: 16px;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    }
    .stat-table-wrap h3 { font-size: 15px; margin-bottom: 10px; }
    .stat-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
    .stat-table th, .stat-table td {
      text-align: center; padding: 10px 8px; font-size: 14px;
      border-bottom: 1px solid var(--border);
    }
    .stat-table th { color: var(--text-faint); font-weight: 500; }
    /* 统计表所有列统一居中，字段等分 */
    .stat-table td, .stat-table th { text-align: center; }
    /* 列宽等分（由 table-layout:fixed 自动分配） */

    /* ---------- 统计面板：标题右侧三角展开按键（复用资源页 cat-toggle 视觉） + 翻页（复用资源页翻页样式） ---------- */
    .stat-wrap-head { position: relative; padding-right: 38px; }
    .stat-wrap-head h3 { margin-bottom: 10px; }
    .stat-toggle {
      position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
      width: 28px; height: 28px; border: none; background: transparent;
      color: var(--blue1); cursor: pointer; display: flex; align-items: center;
      justify-content: center; padding: 0; transition: color 0.2s ease; z-index: 5;
    }
    .stat-toggle:hover { color: var(--blue2); }
    .stat-toggle .toggle-arrow {
      width: 20px; height: 20px; transition: transform 0.3s ease;
      transform: rotate(-90deg); /* 收起状态：箭头向左（与资源页分类三角一致） */
      filter: drop-shadow(0 1px 2px rgba(30,136,229,0.3));
    }
    .stat-toggle.open .toggle-arrow { transform: rotate(0deg); /* 展开状态：箭头向下 */ }
    .stat-wrap-body.collapsed { display: none; }
    /* R14：统计翻页样式已并入全站公共 .uni-pager（ui-common.css），此处旧 .stat-pager 样式移除 */

    /* ---------- 分类 ---------- */
    .cat-row {
      background: var(--card-bg); border-radius: 14px; padding: 12px 16px;
      margin-bottom: 8px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width:100%;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }
    .cat-row .c-name { flex: 1 1 140px; font-size: 15px; min-width: 0; word-break: break-word; }
    /* R25：所有二级分类（含虚拟「全部」行）缩进对齐分类筛选面板——层级深度 20px（=筛选面板 cp-sub(30px) 与 cp-top(10px) 文字位置差；56px = 36px 行内箭头占位补偿 + 20px 层级缩进）；手机端见下方媒体查询（同为 56px，补偿后同为 20px） */
    .cat-row.cat-sub .c-name { padding-left: 56px; }
    .cat-row .c-count { color: var(--text-faint); font-size: 13px; text-decoration: none !important; border-bottom: none !important; width: 80px; min-width: 80px; text-align: left; flex-shrink: 0; }
    .cat-row .c-sort { color: var(--text-faint); font-size: 12px; width: 60px; min-width: 60px; text-align: left; flex-shrink: 0; }
    /* 分类行状态框移到右侧（复用资源管理）：显示/隐藏 → 编辑 → 删除 */
    .cat-row .select-picker { order: 50; }
    .cat-row .row-btn { order: 60; }

    /* ---------- 资源类型列表（编辑弹窗内） ---------- */
    .variant-section {
      margin-top: 16px; padding-top: 14px;
      border-top: 1px dashed var(--border);
    }
    .variant-section h4 {
      font-size: 14px; color: var(--text-light); margin-bottom: 10px;
      display: flex; align-items: center; justify-content: space-between;
    }
    /* R36：媒体插入统一弹窗的输入行——输入框(flex:1) + 右侧本地上传按钮，比例与"资源封面图"那行一致 */
    .input-row { display: flex; gap: 8px; align-items: stretch; margin-bottom: 16px; }
    .input-row .input { flex: 1; min-width: 0; margin-bottom: 0; }
    .input-row .input-upload-btn {
      display: none; white-space: nowrap; width: auto; flex-shrink: 0;
      height: auto; padding: 0 16px; font-size: 13px; font-weight: 500;
      letter-spacing: 0; margin-bottom: 0;
    }
    .input-row.has-upload .input-upload-btn { display: inline-flex; }
    /* 弹窗关闭（open 移除）后按钮隐藏——三种关闭路径（确定/关闭/点蒙层）都不用各改一遍 */
    #inputMask:not(.open) .input-upload-btn { display: none !important; }
    /* 手机端：上传按钮换行也不拆散整行结构（按钮文字缩一点保证同行放下）；
       新增类型按钮同步同款缩小，保持"除文字外一模一样"（R40） */
    @media (max-width: 600px) {
      .input-row { flex-wrap: wrap; }
      .input-row .input-upload-btn { font-size: 12px; padding: 0 12px; }
    }
    /* R40：新增类型按钮——与「上传本地图片」按钮一模一样（除文字）。
       值全部取自实测渲染值：纯蓝底 var(--blue1)、白字 13px/500、8px 圆角、
       0 16px 内边距、40px 高、normal 字距（R36 旧版渐变小键与上传键不一致，本轮对齐） */
    .variant-add {
      border: none; background: var(--blue1);
      color: #fff; padding: 0 16px; height: 40px;
      box-sizing: border-box; border-radius: 8px;
      font-size: 13px; font-weight: 500; letter-spacing: normal;
      white-space: nowrap; margin-bottom: 0;
    }
    /* 手机端与上传按钮同步缩小（必须位于上面的主规则之后——同优先级后者覆盖前者） */
    @media (max-width: 600px) {
      .variant-add { font-size: 12px; padding: 0 12px; }
    }
    .variant-item {
      background: var(--bg-light); border: 1px solid var(--border); border-radius: 8px;
      padding: 10px 12px; margin-bottom: 8px;
      display: flex; align-items: center; gap: 10px;
    }
    .variant-item .v-name { flex: 1; font-size: 14px; font-weight: 500; }
    .variant-item .v-sort { color: var(--text-faint); font-size: 12px; }
    /* ---------- 公告项列表 ---------- */
    .ann-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px; margin-bottom: 6px; background: var(--bg-light); }
    .ann-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
    .ann-item:last-child { margin-bottom: 0; }
    .ann-item.ann-cur { border-color: var(--blue1); box-shadow: 0 0 0 1px var(--blue1) inset; }
    /* 一级默认公告（主公告）：标题固定、不可拖拽/隐藏/删除 */
    .ann-item.primary { background: var(--hover-bg); border-color: var(--blue1); }
    .ann-item.primary .ann-title-input { pointer-events: none; background: transparent; border: none; color: #1a73e8; font-weight: 600; font-size: 14px; }
    .ann-item.primary .select-picker { pointer-events: none; visibility: hidden; cursor: default; }
    .ann-item.primary .select-picker .cat-picker-display { background: var(--bg-light); color: var(--text-faint); border-color: #eee; }
    .ann-item.primary .row-btn { visibility: hidden; pointer-events: none; }

    /* ---------- 弹窗 ---------- */
    .modal-mask {
      position: fixed; inset: 0; z-index: 200;
      background: rgba(0, 0, 0, 0.76);
      display: none; align-items: center; justify-content: center; padding: 16px;
    }
    .modal-mask.open { display: flex; animation: maskIn 0.22s ease; }
    .modal-box {
      position: relative; background: var(--card-bg); border-radius: 14px;
      width: 100%; max-width: 400px; max-height: 88vh; overflow-y: auto; min-height: 160px;
      padding: 26px 22px; text-align: left; animation: modalIn 0.25s ease;
    }
    .modal-box img, .modal-box video { max-width: 100%; height: auto; display: block; }
    .modal-wide { max-width: 520px; }
    /* 按内容量分配档位：大(编辑资源/公告) 中(分类/批量改分类) 小(密码/客服/输入/确认/类型) */
    .modal-mask#editMask > .modal-box, .modal-mask#annMask > .modal-box { max-width: 680px; }
    .modal-mask#catMask > .modal-box, .modal-mask#batchCatMask > .modal-box { max-width: 520px; }
    /* 弹窗宽度由各弹窗 modal-wide/modal-lg 类控制 */
    @keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes modalIn {
      from { opacity: 0; }
      to   { opacity: 1; }
    }
    .modal-title { font-size: 20px; color: var(--text); margin-bottom: 16px; letter-spacing: 1.2px; padding: 0 34px; text-align: center; }
    /* 弹窗右上角关闭按钮 */
    .modal-close-x {
      position: absolute; top: 12px; right: 12px; z-index: 10;
      width: 32px; height: 32px; border-radius: 50%;
      border: none; background: var(--bg-light); color: var(--text-light);
      font-size: 19px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: all 0.10s ease; line-height: 1;
    }
    .modal-close-x:hover { background: #ff4444; color: #fff; transform: scale(0.97); opacity: 0.9; }
    .modal-close-x:active { transform: scale(0.94); opacity: 0.8; filter: brightness(0.9); }
    /* R10 预览弹窗左上角分享键：与×成对角、规格复用（32px 圆形/12px 距角/同动效），
       区分点：淡蓝底+蓝图标，悬停蓝底白图标（×是浅灰底、悬停红底白字） */
    .modal-share-x {
      position: absolute; top: 12px; left: 12px; z-index: 10;
      width: 32px; height: 32px; border-radius: 50%;
      border: none; background: #E3F2FD; color: #1565c0;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      transition: all 0.10s ease; -webkit-tap-highlight-color: transparent;
    }
    .modal-share-x svg { width: 15px; height: 15px; display: block; }
    .modal-share-x:hover { background: #1688FF; color: #fff; transform: scale(0.97); opacity: 0.9; }
    .modal-share-x:active { transform: scale(0.94); opacity: 0.8; filter: brightness(0.9); }
    .form label { display: block; font-size: 13px; color: var(--text-light); margin: 12px 0 5px; }
    .form input, .form textarea, .form select, .input {
      width: 100%; border: 1px solid var(--border); border-radius: 10px;
      padding: 10px 12px; outline: none; background: var(--card-bg);
    }
    .form input:focus, .form textarea:focus, .form select:focus, .input:focus { border-color: var(--blue1); }
    /* ===== 级联分类选择器（一级可直接选，展开看二级） ===== */
    .cat-picker { position: relative; width: 100%; user-select: none; }
    .cat-picker-display {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      width: 100%; min-height: 42px; border: 1px solid var(--border); border-radius: 10px;
      padding: 9px 12px; background: var(--card-bg); cursor: pointer; font-size: 14px; color: var(--text);
      transition: border-color 0.10s, box-shadow 0.10s;
    }
    .cat-picker-display:hover { border-color: #9cc8f0; }
    .cat-picker.open .cat-picker-display { border-color: var(--blue1); box-shadow: 0 0 0 3px rgba(30,136,229,0.12); }
    .cat-picker-display .cpd-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cat-picker-display .cpd-text.placeholder { color: var(--text-faint); }
    .cat-picker-display .cpd-arrow { width: 16px; height: 16px; color: var(--blue1); transition: transform 0.3s ease, color 0.2s ease; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; transform: rotate(-90deg); filter: drop-shadow(0 1px 2px rgba(30,136,229,0.3)); }
    .cat-picker-display:hover .cpd-arrow { color: var(--blue1); }
    .cat-picker-display .cpd-arrow svg { width: 100%; height: 100%; display: block; }
    .cat-picker.open .cpd-arrow { transform: rotate(0deg); }
    .cat-picker-panel {
      display: none; position: fixed; z-index: 6002;
      max-height: 264px; overflow-y: auto; background: var(--card-bg); border: 1px solid var(--border);
      border-radius: 10px; box-shadow: 0 10px 28px rgba(20,60,110,0.16); padding: 6px;
    }
    .cat-picker.open .cat-picker-panel { display: block; }
    .select-picker.open .cat-picker-panel { display: block; }
    .select-picker.open .cat-picker-display { border-color: var(--blue1); box-shadow: 0 0 0 3px rgba(30,136,229,0.12); }
    .select-picker.open .cpd-arrow { transform: rotate(0deg); }
    .cp-item {
      display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 8px;
      cursor: pointer; font-size: 14px; color: var(--text); transition: background 0.10s;
    }
    .cp-item:hover { background: var(--hover-bg); }
    .cp-item.selected { background: #e3f0fd; color: #1976d2; font-weight: 700; }
    .cp-item.cp-top { font-weight: 400; color: var(--text); font-size: 14px; }
    .cp-item.cp-sub { padding-left: 30px; font-weight: 400; color: var(--text); font-size: 14px; }
    .cp-item.cp-all { font-weight: 400; color: var(--text); font-size: 14px; }
    .cp-item .cp-name { flex: 1; }
    .cp-item .cp-chevron {
      width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
      color: var(--blue1); transition: transform 0.3s ease, color 0.2s ease; transform: rotate(-90deg); filter: drop-shadow(0 1px 2px rgba(30,136,229,0.3));
    }
    .cp-item .cp-chevron svg { width: 100%; height: 100%; display: block; }
    .cp-item .cp-chevron:hover { color: var(--blue1); }
    .cp-item.cp-expanded .cp-chevron { transform: rotate(0deg); }
    .cp-children { display: none; }
    .cp-children.show { display: block; }
    .cp-empty { padding: 12px; color: var(--text-faint); font-size: 13px; text-align: center; }
    /* ===== 通用自制下拉选择器（替代原生 select，与分类选择器同风格） ===== */
    .select-picker { position: relative; width: 100%; user-select: none; }
    .rte-toolbar .select-picker { width: 80px; flex-shrink: 0; }
    .rte-toolbar .select-picker .cat-picker-display { min-height: 28px; padding: 4px 8px; border-radius: 6px; font-size: 12px; }
    /* 资源管理筛选工具栏：分类筛选与状态筛选统一尺寸（R18：同一宽度，电脑手机都对齐） */
    .tb-row2 .cat-picker, .tb-row2 .select-picker { width: 138px; flex: 0 0 138px; flex-shrink: 0; }
    .tb-row2 { flex-wrap: nowrap; }
    .tb-row2 .admin-search { flex: 1 1 200px; max-width: none; }
    .tb-row2 .cat-picker-display {
      min-height: 33px; padding: 6px 10px; border-radius: 6px; font-size: 13px; width: auto;
    }
    /* 日期输入框统一样式 */
    input[type="date"], input[type="datetime-local"] {
      width: 100%; border: 1px solid var(--border); border-radius: 10px;
      padding: 10px 12px; outline: none; background: var(--card-bg);
      font-size: 14px; color: var(--text); transition: border-color 0.2s;
    }
    input[type="date"]:focus, input[type="datetime-local"]:focus { border-color: var(--blue1); }
    /* ===== 统一时间选择弹窗（点击输入框弹出，含 今天/清除） ===== */
    .dt-field { cursor: pointer; background: var(--card-bg) !important; }
    .dt-pop {
      display: none; position: fixed; z-index: 6002; width: 268px;
      background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 12px 32px rgba(20,60,110,0.20); padding: 14px;
    }
    /* R15：插入超链接弹窗（编辑器内调用）——同为"弹窗内子弹窗"档，高于放大编辑器(6000/6001) */
    #linkDialogMask { z-index: 6002 !important; }
    .dt-pop.open { display: block; animation: modalIn 0.15s ease; }
    .dt-pop .dt-row { display: flex; gap: 8px; margin-bottom: 10px; }
    .dt-pop input[type="date"], .dt-pop input[type="time"] {
      flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px;
      padding: 8px 10px; font-size: 14px; outline: none;
    }
    .dt-pop input[type="time"] { flex: 0 0 96px; }
    .dt-pop .dt-btns { display: flex; gap: 8px; }
    .dt-pop .dt-btns button {
      flex: 1; height: 34px; border-radius: 8px; font-size: 13px; cursor: pointer;
      border: 1px solid var(--border); background: var(--card-bg); color: var(--text-light); transition: all 0.10s ease;
    }
    .dt-pop .dt-btns button:hover { transform: scale(0.97); opacity: 0.9; }
    .dt-pop .dt-btns button:active { transform: scale(0.94); opacity: 0.8; filter: brightness(0.9); }
    .dt-pop .dt-now { border-color: var(--blue1) !important; color: var(--blue1) !important; font-weight: 600; }
    .dt-pop .dt-ok { background: #1E88E5 !important; color: #fff !important; border: none !important; font-weight: 600; }
    /* 数据统计日期输入框 */
    .stat-date-input {
      height: 36px !important; padding: 0 10px !important; border: 1px solid var(--border) !important; box-sizing: border-box !important;
      border-radius: 8px !important; font-size: 13px !important; width: 165px !important;
    }
    .form textarea { resize: vertical; line-height: 1.6; }
    /* 富文本编辑器 */
    .rte-toolbar {
      display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px;
      background: var(--bg-light); border: 1px solid var(--border); border-bottom: none;
      border-radius: 10px 10px 0 0;
    }
    .rte-btn {
      padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
      background: var(--card-bg); cursor: pointer; font-size: 13px; color: var(--text);
      transition: all 0.10s; min-width: 32px; text-align: center; display: inline-flex; align-items: center; justify-content: center;
    }
    .rte-btn:hover { background: #e3f2fd; border-color: #1976d2; color: #1976d2; }
    .rte-btn:active { transform: scale(0.95); }    .rte-group { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }    .rte-group:last-child { margin-right: 0; }
    .rte-btn.active { background: #1976d2; color: #fff; border-color: #1976d2; }
    /* 预设色板（文字颜色 / 背景颜色）：点色块即应用，无需输入代码 */
    .rte-palette {
      display: inline-flex; align-items: center; gap: 3px;
      padding: 3px 5px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg);
      cursor: pointer;
    }
    .rte-palette:hover { border-color: #1976d2; }
    /* 只保留一个文字颜色色板（原背景色板统一隐藏，避免出现两个颜色选择） */
    .rte-palette[data-cmd="hiliteColor"] { display: none !important; }
    .palette-a { font-size: 12px; font-weight: 700; color: var(--text-light); margin: 0 2px 0 1px; line-height: 1; }
    .palette-swatch {
      width: 16px; height: 16px; border-radius: 50%;
      border: 1px solid rgba(0,0,0,0.15); cursor: pointer; flex-shrink: 0;
      transition: transform 0.08s ease, box-shadow 0.08s ease;
    }
    .palette-swatch:hover { transform: scale(1.25); box-shadow: 0 0 4px rgba(0,0,0,0.3); }
    .palette-swatch:active { transform: scale(0.92); }
    .rte-editor {
      min-height: 150px; max-height: 400px; overflow-y: auto;
      padding: 12px; border: 1px solid var(--border); border-radius: 0 0 10px 10px;
      background: var(--card-bg); line-height: 1.7; font-size: 14px; color: var(--text);
      outline: none;
    }
    .rte-editor:focus { border-color: var(--blue1); }
    /* 放大编辑：脱离弹窗固定为大屏 */
    .rte-editor.rte-large {
      position: fixed; left: 50%; top: 60px; transform: translateX(-50%);
      width: 96vw; max-width: 1200px; height: calc(100vh - 116px); max-height: none !important; min-height: 320px !important;
      z-index: 6000; background: var(--card-bg); border: 2px solid var(--blue1); border-top: none;
      border-radius: 0 0 12px 12px; box-shadow: 0 0 0 100vw rgba(0,0,0,0.55), 0 16px 48px rgba(0,0,0,0.35);
      overflow-y: auto;
    }
    .rte-editor.rte-large ~ * { }
    .rte-zoom.rte-zoom-on { background: var(--blue1); color: #fff; border-color: var(--blue1); } .rte-toolbar.rte-toolbar-large { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); width: 96vw; max-width: 1200px; z-index: 6001; background: var(--card-bg); border: 2px solid var(--blue1); border-bottom: none; border-radius: 12px 12px 0 0; padding: 8px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-start; box-shadow: 0 -4px 16px rgba(0,0,0,0.12); } .rte-toolbar.rte-toolbar-large .rte-btn, .rte-toolbar.rte-toolbar-large .rte-select { font-size: 15px; padding: 7px 12px; }
    .rte-zoom { font-weight: 600; }    .rte-toolbar .select-picker .cat-picker-display { min-height: 0; height: 32px; padding: 0 10px; align-self: center; border-radius: 6px; font-size: 13px; }    .rte-toolbar.rte-toolbar-large .select-picker .cat-picker-display { height: 36px; font-size: 15px; }
    .rte-editor img, .rte-editor video { max-width: 100%; border-radius: 8px; margin: 8px 0; } .rte-editor video { width: 100%; height: auto; display: block; }
    .rte-editor a { color: #1976d2; text-decoration: underline; }
    .rte-editor ul, .rte-editor ol { padding-left: 24px; margin: 6px 0; }
    .rte-editor li { margin: 3px 0; }
    .rte-editor p { margin: 4px 0; }
    .rte-editor h1,.rte-editor h2,.rte-editor h3 { margin: 8px 0 4px; line-height:1.4; }
    .rte-editor blockquote { border-left: 3px solid var(--border); padding-left:10px; color: var(--text-light); margin:6px 0; }
    .form .hint { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
    /* ---------- 统一复选框 / 单选框：放大、清晰、易点 ---------- */
    input[type="checkbox"], input[type="radio"] {
      width: 20px; height: 20px; flex-shrink: 0; cursor: pointer;
      accent-color: var(--blue1); margin: 0;
    }
    input[type="radio"] { width: 19px; height: 19px; }
    .form .checkbox-row {
      display: flex; align-items: center; gap: 10px; margin-top: 14px;
      cursor: pointer; padding: 9px 12px; background: var(--bg-light);
      border: 1px solid var(--border); border-radius: 10px; font-size: 15px; color: var(--text);
      transition: border-color 0.15s, background 0.15s;
    }
    .form .checkbox-row:hover { border-color: var(--blue2); background: var(--hover-bg); }
    .form .checkbox-row input { width: 20px; height: 20px; cursor: pointer; accent-color: var(--blue1); }
    .modal-footer { display: flex; gap: 10px; margin-top: 18px; align-items: center; }
    /* 预览按钮 */
    .preview-btn {
      padding: 0 18px; height: 44px; border: 1px solid var(--blue1);
      border-radius: 8px; background: var(--card-bg); color: var(--blue1);
      font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.10s ease;
    }
    .modal-footer .preview-btn:hover { background: var(--blue1); color: #fff; transform: scale(0.97); opacity: 0.9; }
    .modal-footer .preview-btn:active { transform: scale(0.94); opacity: 0.8; filter: brightness(0.9); }
    /* 视图切换动画（管理页/资源页一致） */
    @keyframes viewSwitch { from { opacity: 0.4; transform: scale(0.985); } to { opacity: 1; transform: scale(1); } }
    .view-switch-anim { animation: viewSwitch 0.18s ease; }
    /* 预览弹窗 */
    .preview-box { position: relative; animation: modalIn 0.25s ease; } .preview-box img, .preview-box video { max-width: 100%; height: auto; border-radius: 8px; } .preview-box img { display: block; margin: 8px auto; } .preview-box video { width: 100%; display: block; }
    /* R15：预览弹窗与资源页资源弹窗逐项完全同步（尺寸/字号/颜色/按键宽度/动画/移动端全一致）
       同步目标：shop.html 的 .modal-wrap(680px) / .modal-cover / .modal-title / .modal-price /
       .modal-desc / .modal-detail / .variant-tab(s) / .variant-detail / .btn-contact / .btn-close-modal */
    #previewMask > .modal-box { max-width: 680px; }
    #previewMask .preview-body { padding: 16px 20px 20px; }
    #previewMask .preview-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
    #previewMask .preview-title { font-size: 22px; font-weight: 700; color: var(--text); flex: 1; line-height: 1.4; letter-spacing: 0.5px; padding-right: 36px; }
    #previewMask .preview-price { color: #ff6b35; font-size: 24px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
    #previewMask .preview-desc { font-size: 15px; color: var(--blue1); margin-bottom: 14px; font-weight: 600; line-height: 1.6; }
    /* R36：预览弹窗富文本图/视频与资源页一致——宽度 100% 且高度上限，竖长图不撑爆弹窗 */
    #previewMask .preview-detail img, #previewMask .preview-detail video { max-width: 100%; max-height: 60vh; height: auto; display: block; margin: 10px auto; border-radius: 8px; }
    #previewMask .preview-detail { background: var(--bg-light); border-radius: 10px; padding: 14px 16px; font-size: 14px; color: var(--text-light); line-height: 1.9; white-space: pre-wrap; margin-bottom: 14px; border-left: 3px solid var(--blue2); word-break: break-word; overflow-wrap: break-word; }
    /* 类型切换：与资源页 .variant-tabs / .variant-tab / .variant-detail / .variant-header 同款 */
    #previewMask .variant-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
    #previewMask .variant-tab { padding: 6px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text-light); font-size: 13px; cursor: pointer; transition: all 0.15s ease; user-select: none; }
    #previewMask .variant-tab:hover { border-color: var(--blue1); color: var(--blue1); background: var(--hover-bg); transform: translateY(-1px); }
    #previewMask .variant-tab.active { background: var(--blue1); color: #fff; border-color: transparent; font-weight: 600; }
    #previewMask .variant-detail { background: var(--bg-light); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
    #previewMask .variant-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
    #previewMask .variant-name { font-size: 15px; font-weight: 600; color: var(--text); }
    #previewMask .variant-price { color: #ff6b35; font-size: 17px; font-weight: 700; }
    #previewMask .variant-detail .v-desc { font-size: 13px; color: var(--text-light); line-height: 1.8; white-space: pre-wrap; margin-bottom: 8px; }
    #previewMask .variant-detail img, #previewMask .variant-detail video { width: 100%; border-radius: 8px; margin-bottom: 6px; display: block; }
    /* 底部按键：与资源页 .btn-contact / .btn-close-modal 同款（46px/16px/hover/active 动画一致），
       且两键等宽（资源页 .modal-footer button { flex:1 } 同款） */
    #previewMask .modal-footer.preview-footer { padding: 0 20px 20px; gap: 10px; }
    #previewMask .modal-footer.preview-footer button { flex: 1; min-width: 0; }
    #previewContactBtn.preview-cta {
      display: inline-flex; align-items: center; justify-content: center; gap: 6px;
      flex: 1; height: 46px; border: none; border-radius: 10px;
      background: var(--blue1); color: #fff; font-size: 16px; font-weight: 600;
      letter-spacing: 1px; cursor: pointer; transition: all 0.10s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .preview-close-btn {
      display: flex; align-items: center; justify-content: center;
      background-color: var(--red); color: #fff; border: none; padding: 0 28px; height: 46px;
      border-radius: 10px; font-size: 16px; cursor: pointer; transition: all 0.10s ease;
      -webkit-tap-highlight-color: transparent;
    }
    #previewContactBtn.preview-cta:hover, .preview-close-btn:hover { transform: scale(0.97); opacity: 0.9; }
    #previewContactBtn.preview-cta:active, .preview-close-btn:active { transform: scale(0.94); opacity: 0.8; filter: brightness(0.9); }
    /* 封面：与资源页 .modal-cover 同款（320px 上限、16px 边距） */
    /* R43：与资源页 .modal-cover 同步——内在比例自适应，圆角裁真实图片内容 */
    #previewMask .preview-cover {
      width: auto; height: auto; max-width: calc(100% - 32px); margin: 16px auto 0;
      max-height: 320px; display: block; aspect-ratio: auto; object-fit: contain; /* R43：压掉 805 行裸 .preview-cover 的 16/9+cover（特异性低于本规则，但 aspect-ratio 此前未在本规则声明） */
      background: var(--bg-light); border-radius: 10px; border: 1px solid var(--border);
    }
    /* 移动端：与资源页 @media(max-width:600px) 弹窗适配逐项一致 */
    @media (max-width: 600px) {
      #previewMask > .modal-box { max-width: 100%; max-height: 92vh; border-radius: 12px; }
      #previewMask .preview-cover { width: auto; max-width: calc(100% - 24px); margin: 12px auto 0; max-height: 220px; aspect-ratio: auto; }
      #previewMask .preview-body { padding: 12px 16px 16px; }
      #previewMask .preview-title { font-size: 18px; }
      #previewMask .preview-price { font-size: 20px; }
      #previewMask .preview-desc { font-size: 14px; }
      #previewMask .preview-detail { font-size: 13px; padding: 10px 12px; }
      #previewMask .modal-footer.preview-footer { padding: 0 16px 16px; gap: 8px; }
      #previewContactBtn.preview-cta, .preview-close-btn { height: 42px; font-size: 15px; }
      .preview-close-btn { padding: 0 20px; }
      #previewMask .variant-tab { padding: 5px 14px; font-size: 12px; }
    }
    /* 感叹号占位自适应：容器内完整显示、居中、淡白填充、不溢出 */
    img[src^="data:image/svg+xml"]{display:block;width:100%;height:100%;object-fit:contain!important;object-position:center;background: var(--bg-light)!important;}
    /* 弹窗内占位符统一：16:9 自适应区域、左右对称、不撑破弹窗、不裁切 */
    .modal-box img[src^="data:image/svg+xml"]:not(.preview-cover), .preview-box img[src^="data:image/svg+xml"] { height: auto !important; aspect-ratio: 16 / 9; min-height: 120px; max-width: 100%; margin: 8px auto; }
    .preview-cover {
      width: calc(100% - 32px); margin: 16px 16px 0;
      max-height: 280px; aspect-ratio: 16 / 9; object-fit: cover; display: block;
      background: var(--bg-light); border-radius: 10px; border: 1px solid var(--border);
    }
    .modal-inner-btn {
      flex: 1; height: 44px; border: none; border-radius: 8px;
      color: #fff; font-size: 16px; font-weight: 600; letter-spacing: 1px;
      background: linear-gradient(180deg, var(--blue1) 0%, var(--blue2) 100%);
    }
    .modal-close {
      flex: 1; background-color: var(--red); color: #fff; border: none;
      padding: 0 24px; height: 44px; border-radius: 8px; font-size: 16px; font-weight: 600;
    }
    .modal-inner-btn, .modal-close, .btn-blue, .row-btn, .switch, .variant-add {
      transition: all 0.10s ease;
    }
    .modal-inner-btn:hover, .modal-close:hover, .btn-blue:hover,
    .row-btn:hover, .switch:hover, .variant-add:hover {
      transform: scale(0.97); opacity: 0.9;
    }
    .modal-inner-btn:active, .modal-close:active, .btn-blue:active,
    .row-btn:active, .switch:active, .variant-add:active {
      transform: scale(0.94); opacity: 0.8; filter: brightness(0.9);
    }

    /* toast 轻提示 */
    .toast {
      position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
      background: rgba(0,0,0,0.82); color: #fff; padding: 10px 24px;
      border-radius: 8px; font-size: 14px; z-index: 9999;
      opacity: 0; transition: opacity 0.25s; pointer-events: none;
      max-width: 90%; text-align: center;
    }
    .toast.show { opacity: 1; }
    .toast.error { background: rgba(220,53,69,0.92); }
    .toast.success { background: rgba(40,167,69,0.92); }

    /* 批量操作工具栏 */
    .batch-bar {
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; opacity: 0; transition: max-height .2s ease, padding .2s ease, opacity .15s ease;
      background: var(--bg-light); border-radius: 8px; padding: 0 12px;
      margin-bottom: 0; font-size: 13px; color: var(--text-light);
    }
    .batch-bar.show { max-height: 80px; padding-top: 8px; padding-bottom: 8px; opacity: 1; margin-bottom: 12px; }
    .batch-bar .batch-count { font-weight: 600; color: var(--blue1); }
    .batch-btn {
      border: 1px solid var(--border); background: var(--card-bg); color: var(--text-light);
      padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer;
    }
    .batch-btn.danger { color: var(--red); border-color: #ffc8c8; }

    /* 隐藏资源 badge */
    .badge.hidden { background: #fff3cd; color: #856404; }

    /* 图片预览 */
    .img-preview {
      margin-top: 6px; max-width: 120px; max-height: 120px;
      border-radius: 8px; object-fit: contain; display: none;
      border: 1px solid var(--border); background: var(--bg-light);
    } /* R42：表单预览 contain 完整显示（不超框不裁切，与资源弹窗封面同语义） */
    .img-preview.show { display: block; }

    /* 平台设置表单 */
    .setting-group {
      background: var(--card-bg); border-radius: 12px; padding: 20px;
      margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    }
    .setting-group h3 { font-size: 16px; margin-bottom: 14px; color: var(--text); }
    .setting-row { margin-bottom: 14px; }
    .setting-row label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 6px; }

    /* 统计趋势图 */
    .trend-chart {
      background: var(--card-bg); border-radius: 12px; padding: 16px;
      margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    }
    .trend-chart h3 { font-size: 15px; margin-bottom: 12px; }
    .stats-loading { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:60px 0; color: var(--text-faint); font-size:14px; gap:12px; }
    .stats-loading .sl-spin { width:30px; height:30px; border:3px solid var(--border); border-top-color:var(--blue1); border-radius:50%; animation:slspin .8s linear infinite; }
    @keyframes slspin { to { transform: rotate(360deg); } }
    .stats-fade-in { animation: statFade .3s ease; }
    @keyframes statFade { from { opacity:.2; } to { opacity:1; } }
    /* R70：灰底/圆角上收到 chart-box 外层容器（与 line-chart 同构：灰盒装图表+图例）；柱区高度由 JS 按折线图实际高同步写入 --barZone */
    .chart-box { background: var(--bg-light); border-radius: 10px; padding: 0; margin-bottom: 8px; overflow: hidden; }
    .trend-bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding: 12px 2.5% 0 5%; position: relative; }
    /* R66：柱状图网格层——对齐柱状区（bottom 24px 高 100px），折线图同款灰线 #e8e8e8 与左侧数字 #999；
       grid 先插 DOM、柱列（relative）靠后绘制，网格线在柱子后面 */
    /* R68：网格对齐柱状绘图区（left 与 .trend-bars 的 padding-left 5% 一致），数字紧贴柱区左缘——与折线图数字贴折线区同理；R70 高度跟随 --barZone */
    .trend-grid { position: absolute; left: 5%; right: 2.5%; bottom: 24px; height: var(--barZone, 100px); pointer-events: none; }
    .trend-grid .tg-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #e8e8e8; }
    .trend-grid .tg-num { position: absolute; right: calc(100% + 2px); top: -5px; font-size: 10px; color: #999; text-align: right; line-height: 1; }
    .trend-bars::-webkit-scrollbar { display: none; }
    .trend-col { flex: 1 1 0; min-width: 0; position: relative; height: 100%; }
    .trend-bar-wrap { position: absolute; left: 2px; right: 2px; bottom: 24px; display: flex; flex-direction: row; justify-content: flex-end; height: var(--barZone, 100px); gap: 3px; }
    /* R57：每列两组并排——左本期实色、右上期浅色半透明；组内仍是浏览/咨询客服纵向堆叠 */
    .trend-bar-group { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 2px; }
    .trend-bar.ghost { opacity: 0.32; }
    /* R58：箭头不再是列顶固定定位，而是放进本期组内（浏览柱上方）——组是 column 底对齐，箭头 DOM 在柱前面即贴柱顶、跟随柱高度 */
    .trend-arrow { text-align: center; font-size: 10px; line-height: 1; margin-bottom: 2px; }
    .trend-arrow.up { color: #1a9e4a; }
    .trend-arrow.down { color: #d43c3c; }
    .trend-arrow.flat { color: #9aa4b2; }
    .trend-bar { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; transition: height 0.3s; }
    .trend-bar.view { background: var(--blue1); }
    .trend-bar.contact { background: #ff9900; }
    .trend-label { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--text-faint); white-space: nowrap; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; box-sizing: border-box; max-width: 100%; }
    .trend-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--text-light); justify-content: center; }
    .trend-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
    .trend-legend .lg-view::before { background: var(--blue1); }
    .trend-legend .lg-contact::before { background: #ff9900; }
    /* R64：图例逐系列×逐期（4项）——本期=系列色实块，上期=同色 32% 透明块（与图中的 ghost 柱一致） */
    .trend-legend { flex-wrap: wrap; }
    .trend-legend .lg-view-cur::before { background: var(--blue1); }
    .trend-legend .lg-view-prev::before { background: rgba(30, 136, 229, 0.32); }
    .trend-legend .lg-contact-cur::before { background: #ff9900; }
    .trend-legend .lg-contact-prev::before { background: rgba(255, 153, 0, 0.32); }
    /* R65：对比上期按钮（复用 btn-blue 应用键样式）——开启态绿底提示已开启 */
    /* R67：对比上期键尺寸完全复用应用键（admin.html inline 与其一致），此处只留开启态配色 */
    /* R70：开启态淡蓝——实测取自顶栏「资源管理」等 tab 胶囊的视觉色 rgb(100,176,241)（半透白叠蓝渐变合成），更贴页面审美 */
    .cmp-btn.cmp-on { background: #64B0F1 !important; }

    /* 时间筛选 */
    .time-filter { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
    .time-btn {
      height: 36px; padding: 0 14px; border: none; background: var(--card-bg); color: var(--text-light); display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
      font-size: 13px; cursor: pointer; transition: all 0.10s ease;
      flex: 1 1 0; min-width: 64px; /* R18：同组按钮等宽对齐 */
    }
    .time-btn.active { background: var(--blue1); color: #fff; font-weight: 600; }
    .time-btn:hover:not(.active) { background: var(--hover-bg); }

    /* 导出按钮 */
    .export-btn {
      height: 36px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--blue1); border-radius: 8px;
      background: var(--card-bg); color: var(--blue1); font-size: 13px; font-weight: 600;
      cursor: pointer; transition: all 0.10s ease;
    }
    .export-btn:hover { background: var(--blue1); color: #fff; }
    .export-btn:active { transform: scale(0.95); }
    #exportBtn { margin-left: auto; flex-shrink: 0; }
    /* 数据统计：时间筛选+导出单独一行（访问趋势标题上方），标题独占一行 */
    #panel-stats .trend-chart > div:first-child { flex-wrap: wrap; }
    #panel-stats .trend-chart > div:first-child h3 { flex: 1 1 100% !important; order: 2; margin: 0 0 12px; }
    #panel-stats .trend-chart > div:first-child > div { flex: 1 1 100% !important; order: 1; }

    /* 折线图 */
    .line-chart { position: relative; background: var(--bg-light); border-radius: 10px; padding: 12px 0; margin-bottom: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .line-chart svg { display: block; }
    .line-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--text-light); justify-content: center; }
    .line-legend span { display: flex; align-items: center; gap: 6px; }
    .line-legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
    .line-legend .lg-view i { background: var(--blue1); }
    .line-legend .lg-contact i { background: #ff9900; }
    .line-legend .lg-resource i { background: #4CAF50; }
    /* R64：图例逐系列×逐期（6项）——本期=系列色实线段，上期=同系列色虚线段（35% 透明度与图中一致） */
    .line-legend { flex-wrap: wrap; }
    .line-legend .lg-view-cur i { background: var(--blue1); }
    .line-legend .lg-view-prev i { background: none; height: 0; border-top: 3px dashed rgba(30, 136, 229, 0.5); }
    .line-legend .lg-contact-cur i { background: #ff9900; }
    .line-legend .lg-contact-prev i { background: none; height: 0; border-top: 3px dashed rgba(255, 153, 0, 0.5); }
    .line-legend .lg-resource-cur i { background: #4CAF50; }
    .line-legend .lg-resource-prev i { background: none; height: 0; border-top: 3px dashed rgba(76, 175, 80, 0.5); }
    /* R65：上期图例项默认隐藏（对比上期关闭时只显示本期），.show-prev 时显示；本期左/上期右以竖线分隔 */
    .lg-prev-sep { width: 1px; height: 14px; background: #d8dee8; align-self: center; margin: 0 6px; }
    .line-legend:not(.show-prev) .lg-prev-sep, .line-legend:not(.show-prev) [class$="-prev"] { display: none; }
    .trend-legend:not(.show-prev) .lg-prev-sep, .trend-legend:not(.show-prev) [class$="-prev"] { display: none; }
    .trend-legend { flex-wrap: wrap; }

    /* 手机端适配 */
    @media (max-width: 600px) {
      .topbar-inner { gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
      .topbar-logo { width: 30px; height: 30px; }
      .topbar-brand { flex: 1; min-width: 0; font-size: 16px; }
        .topbar-brand span { display: none; }
      .topbar-right { flex-shrink: 0; }
      .tabs {
        order: 3; width: 100%; flex: 0 0 100%;
        display: flex; gap: 6px; overflow-x: auto;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
      }
      .tabs::-webkit-scrollbar { display: none; }
      .tab { flex: 1 0 auto; text-align: center; }
      .container { padding: 12px; }
      .toolbar { flex-wrap: wrap; gap: 8px; }
      .admin-search { max-width: 100%; flex-basis: 100%; order: 3; }
      /* R37 方案A（用户拍板）：手机列表模式=横向紧凑行——
         第一行：勾选框 + 60px小缩略图 + 标题/分类/简介 + 拖动排序小把手
         第二行：显示状态框（左） + 编辑/复制/删除平铺（右）
         整条约110~125px高，一屏6~7条，真正像"列表"。
         注意：drag-handle 在列表模式是流内元素（桌面 flex 行首），grid 里必须显式指定
         落格，否则它会挤掉勾选框的格子、后续元素全体错位 */
      #productList:not(.card-view) .product-row {
        display: grid;
        grid-template-columns: 20px 60px minmax(0, 1fr) 24px;
        column-gap: 10px; row-gap: 8px;
        align-items: center;
        padding: 10px 12px;
      }
      #productList:not(.card-view) .product-row .drag-handle { grid-row: 1; grid-column: 4; width: 24px; height: 24px; font-size: 12px; align-self: start; }
      #productList:not(.card-view) .product-row .row-check { grid-row: 1; grid-column: 1; position: static; width: 20px; height: 20px; margin: 0; }
      #productList:not(.card-view) .product-row .thumb { grid-row: 1; grid-column: 2; width: 60px; height: 60px; border-radius: 8px; }
      #productList:not(.card-view) .product-row .info { grid-row: 1; grid-column: 3; min-width: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
      #productList:not(.card-view) .product-row .p-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
      #productList:not(.card-view) .product-row .p-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
      #productList:not(.card-view) .product-row .badge { align-self: flex-start; font-size: 10px; padding: 1px 6px; }
      #productList:not(.card-view) .product-row .select-picker { grid-row: 2; grid-column: 1 / 3; margin: 0; align-self: center; justify-self: start; }
      #productList:not(.card-view) .product-row .p-ops { grid-row: 2; grid-column: 3 / 5; display: flex; gap: 8px; padding: 0; }
      #productList:not(.card-view) .product-row .p-ops .row-btn { flex: 1; text-align: center; }
      /* R37：网格视图（card-view）保持竖版卡片——原来竖排基础由列表模式"顺带"提供，
         列表模式改横向 grid 后，把竖排基础显式落到 card-view 自己头上 */
      #productList.card-view .product-row {
        flex-wrap: nowrap;
        flex-direction: column;
        align-items: stretch;
        padding: 0; overflow: hidden; gap: 0;
        position: relative;
      }
      #productList.card-view .product-row .row-check { position: absolute; top: 8px; left: 8px; z-index: 2; width: 20px; height: 20px; }
      #productList.card-view .product-row .thumb { width: 100%; height: 90px; border-radius: 0; }
      #productList.card-view .product-row .info { flex-basis: 100%; padding: 8px 10px 4px; }
      #productList.card-view .product-row .p-ops { width: 100%; display: flex; gap: 6px; padding: 0 10px 8px; flex-wrap: wrap; justify-content: flex-start; }
      #productList.card-view .product-row .p-ops .row-btn { flex: 1 1 0; min-width: 0; padding: 7px 2px; font-size: 12px; white-space: nowrap; box-sizing: border-box; text-align: center; }
      #productList.card-view .product-row .select-picker { margin: 2px 10px 8px; align-self: flex-start; width: auto; max-width: calc(100% - 16px); flex-shrink: 0; }
      /* 网格视图手机端两列 */
      #productList.card-view { grid-template-columns: repeat(2, 1fr); gap: 10px; }
      .stat-cards { grid-template-columns: repeat(2, 1fr); }
      .modal-box { padding: 18px 16px; }
      .modal-footer { flex-wrap: wrap; }
      .modal-footer button { flex: 1; min-width: 100px; }
      .preview-btn { flex-basis: 100%; order: -1; }
      .time-filter { flex: 1; }
      .time-btn { flex: 1; padding: 6px 8px; font-size: 12px; }
      .stat-date-input { flex: 1 1 130px; min-width: 0 !important; font-size: 12px !important; padding: 7px 8px !important; }
      .trend-chart { padding: 12px; }
      .rte-toolbar { gap: 3px; padding: 6px; }
      .rte-toolbar .rte-btn, .rte-toolbar .rte-select { font-size: 12px; padding: 4px 6px; }
      .tb-row2 { gap: 8px; flex-wrap: wrap; }
      /* R18：手机端两个筛选框并排等宽（升级后的状态筛选外壳 .select-picker 一并覆盖） */
      .tb-row2 .cat-picker, .tb-row2 .select-picker { flex: 1 1 calc(50% - 5px); width: auto; }
      /* R19：分类管理手机端两行式——第一行=名称(超长省略号)+排序+资源数（名称 flex:1 占满首行，状态框/按钮必然落到第二行），第二行=状态框+编辑/删除按钮 */
      .cat-row { gap: 8px 10px; }
      .cat-row .c-name { flex: 1 1 0 !important; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .cat-row .c-sort, .cat-row .c-count { flex: 0 0 auto; white-space: nowrap; }
      /* R20：第二行状态框+按钮整体靠右（margin-left:auto 加在 order:50 的首元素上；虚拟「全部」行的占位 span 无类名，用属性选择器匹配） */
      .cat-row .select-picker, .cat-row span[style*="order:50"] { margin-left: auto; }
      /* R23：二级分类手机端缩进压小（覆盖桌面 128px），给名称列腾出空间 */
      .cat-row.cat-sub .c-name { padding-left: 56px !important; } /* R25：二级行盒子比一级靠左 36px（无展开箭头），56px 补偿后层级深度 20px（对齐筛选面板） */
      /* 数据统计：1/7/30天一行、日期筛选一行，均分不超框 */
      .trend-chart .time-filter { flex-basis: 100%; max-width: 100%; }
      .trend-chart .time-filter + div { flex-basis: 100%; max-width: 100%; }
      .trend-chart .stat-date-input { flex: 1; min-width: 0 !important; }
      .trend-bars { gap: 2px; }
      .trend-label { font-size: 9px; }
      /* 批量栏按钮紧凑换行，不超出画面 */
      .batch-bar { gap: 6px; padding: 8px 10px; }
      .batch-btn { padding: 5px 9px; font-size: 12px; }
      .back-top { right: 14px; bottom: 18px; width: 40px; height: 40px; }
    }

    /* ========== 统一按钮动画（跟资源页一致；.tab/.view-btn 已统一由 ui-common.css 定义） ==========
       弹窗按键（.modal-inner-btn/.modal-close/.confirm 系）的按压效果已统一抽入
       ui-common.css「全站统一弹窗按键按压效果」（变暗+降透明、不缩放、字重恒定），此处不再重复。 */
    .btn-blue, .btn-cyan, .export-btn, .batch-btn,
    .variant-add, .time-btn, .cat-toggle,
    .preview-btn, .status-select, .row-btn {
      transition: all 0.10s ease;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .btn-blue:hover, .btn-cyan:hover,
    .export-btn:hover, .batch-btn:hover, .variant-add:hover,
    .time-btn:hover, .cat-toggle:hover,
    .preview-btn:hover, .row-btn:hover {
      transform: scale(0.96);
      opacity: 0.9;
    }
    .btn-blue:active, .btn-cyan:active,
    .export-btn:active, .batch-btn:active, .variant-add:active,
    .time-btn:active, .cat-toggle:active,
    .preview-btn:active, .row-btn:active {
      transform: scale(0.92);
      opacity: 0.8;
      filter: brightness(0.9);
    }
    /* 按钮统一纯色（取消渐变，与资源页一致） */
    .btn-blue, .modal-inner-btn { background: var(--blue1) !important; }
    /* logo 统一为名称大小（覆盖上方定义） */
    .topbar-logo { width: 38px !important; height: 38px !important; align-self: center; display: block; }
    .topbar-brand span { line-height: 1; display: flex; align-items: center; }
    /* 原生状态 select 在转换为自制选择框前不可见，避免闪现绿色默认样式（分类/公告/资源） */
    .status-select { opacity: 0; }
    /* 弹窗底部按钮宽度统一：2 个等宽、3 个等分 */
    .modal-footer button { flex: 1 1 0; min-width: 0; }
    .modal-footer .preview-btn { flex-basis: auto; }
    /* 列表/网格按键：完全复用 ui-common.css 公共 .view-btn（与资源页同一份，零复制）。
       公共样式按"融入背景"参数化设计：未激活透明底+浅描边融入管理页白底，激活蓝底白字
       ——与 tab 激活观感一致；资源页由 .on-blue 上下文切换白系（见 ui-common.css），管理页无需任何本地规则。 */
    /* 商品条目切换动画复用商品页：限制形变过渡，仅保留缩放/阴影，切换时不做布局形变 */
    .product-row { transition: transform 0.10s ease, box-shadow 0.10s ease !important; }
    /* 公告列表防横向滚动条：溢出隐藏（新增公告项不再瞬间出现横向滑轮） */
    .ann-list { overflow-x: hidden; }
    .ann-item { overflow: hidden; }
    .cat-row .select-picker .cat-picker-display { width: auto; min-height: 0; border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 13px; color: var(--text-light); }
    .cat-row .select-picker .cpd-arrow { width: 14px; height: 14px; }
    .ann-item .select-picker .cat-picker-display { width: auto; min-height: 0; border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 13px; color: var(--text-light); }
    .ann-item .select-picker .cpd-arrow { width: 14px; height: 14px; }
    .modal-mask#annMask > .modal-box, .modal-mask#editMask > .modal-box, .modal-mask#variantMask > .modal-box { max-height: 84vh; display: flex !important; flex-direction: column !important; align-items: stretch !important; justify-content: flex-start !important; }
    .modal-mask#annMask > .modal-box .modal-title, .modal-mask#editMask > .modal-box .modal-title, .modal-mask#variantMask > .modal-box .modal-title, .modal-mask#annMask > .modal-box .modal-footer, .modal-mask#editMask > .modal-box .modal-footer, .modal-mask#variantMask > .modal-box .modal-footer { flex-shrink: 0; width: 100% !important; }
    .modal-mask#annMask > .modal-box .form, .modal-mask#editMask > .modal-box .form, .modal-mask#variantMask > .modal-box .form { flex: 1; overflow-y: auto; min-height: 0; margin-right: -22px; padding-right: 22px; }
    .modal-mask#catMask > .modal-box { max-height: 84vh; display: flex !important; flex-direction: column !important; align-items: stretch !important; justify-content: flex-start !important; }
    .modal-mask#catMask > .modal-box .form { flex: 1; overflow-y: auto; min-height: 0; margin-right: -22px; padding-right: 22px; }
    .cat-row { animation: rowIn 0.15s ease; }
    #productList, #catList { transition: opacity 0.1s ease; }
    .stat-card { animation: rowIn 0.15s ease; }
    /* === 弹窗三档统一尺寸 === */
    .modal-mask#confirmMask > .modal-box, .modal-mask#pwdMask > .modal-box, .modal-mask#inputMask > .modal-box { max-width: 480px !important; }
    .modal-mask#batchCatMask > .modal-box { max-width: 560px !important; }
    .modal-mask#annMask > .modal-box { max-width: 660px !important; }
    /* 管理页 logo 栏与资源页完全一致（复用 shop 样式：名称始终显示、自然宽度） */
    .topbar-brand { flex: 0 0 auto !important; min-width: 0; gap: 12px !important; }
    .topbar-brand span { display: inline !important; }
    @media (max-width: 600px) { .topbar-brand span { letter-spacing: 1px !important; } }
    /* 手机端筛选行收纳：筛选标签行隐藏（全选在“新增资源”右侧另有入口） */
    #panel-products .tb-row2 label { display: none !important; }
    /* 手机端网格卡片：操作按钮（状态/编辑/复制/删除）完整可见，不被裁剪或换行竖排 */
    @media (max-width: 600px) {
      #productList.card-view .product-row .select-picker { margin: 2px 8px 6px; width: auto; max-width: calc(100% - 16px); flex-shrink: 0; }
      #productList.card-view .product-row .select-picker .cat-picker-display { white-space: nowrap; }
      #productList.card-view .product-row .p-ops { padding: 0 8px 10px; gap: 6px; }
      #productList.card-view .product-row .p-ops .row-btn { white-space: nowrap; min-width: 0; }
      #productList.card-view .product-row .info { padding: 8px 8px 4px; }
      #productList.card-view .product-row .thumb { aspect-ratio: 4/3; }
    }
    /* 公告项名字直接在项内编辑 */
    .ann-title-input { border: 1px solid transparent; background: transparent; font-size: 14px; color: var(--text); min-width: 60px; width: auto; flex: 1; padding: 2px 4px; border-radius: 4px; outline: none; }
    .ann-title-input:hover, .ann-title-input:focus { border-color: #ddd; background: var(--card-bg); }
    /* === 全系统弹窗横向溢出防护：禁止底部滑轮，内容超宽一律裁剪/换行 === */
    .modal-box, .modal-wrap, .ann-box, .modal-detail, .ann-body, .media-list, .variant-detail, .form, .rte-editor, .rte-large, .ann-list, .cat-picker-panel { overflow-x: hidden; }
    .modal-detail, .ann-body, .variant-detail, .rte-editor { word-break: break-word; overflow-wrap: anywhere; }
    .modal-detail img, .modal-detail video, .modal-detail table, .modal-detail iframe, .modal-detail svg, .ann-body img, .ann-body video, .ann-body table, .ann-body iframe, .ann-body svg, .variant-detail img, .variant-detail video, .variant-detail table, .variant-detail iframe, .rte-editor img, .rte-editor video, .rte-editor table, .rte-editor iframe, .media-list img, .media-list video, .media-list table, .media-list iframe { max-width: 100% !important; height: auto; }
    /* === R21：弹窗内视频固定 16:9 占位（object-fit:contain 黑底完整显示）=== 未加载/加载完成/加载失败三种状态尺寸完全一致，弹窗不再先小后大跳动；!important 同时压过富文本/RTE 内联样式 */
    .modal-box video, .ann-body video, .ann-box video, .modal-detail video, .variant-detail video, .media-list video, .rte-editor video, .preview-box video {
      width: 100% !important; max-width: 100% !important; aspect-ratio: 16 / 9 !important; height: auto !important;
      object-fit: contain; background: #000; display: block; border-radius: 8px;
    }
    /* 滚动条已恢复浏览器默认样式（用户要求取消自定义滚动轮） */
      /* 全系统弹窗遮罩层强制统一：填满整个视口+居中显示，覆盖任何异常样式 */
    .modal-mask, .share-mask, .lightbox { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100vh !important; margin: 0 !important; padding: 16px !important; box-sizing: border-box !important; align-items: center !important; justify-content: center !important; flex-direction: row !important; }
    .modal-mask > *, .share-mask > *, .lightbox > * { margin: auto !important; float: none !important; }
    /* 强制统一所有 tab section 的置顶高度：section 及第一个子元素无顶部间距 */
    #panel-products, #panel-categories, #panel-stats, #panel-settings { margin: 0 !important; padding: 0 !important; }
    #panel-products > :first-child, #panel-categories > :first-child, #panel-stats > :first-child, #panel-settings > :first-child { margin-top: 0 !important; padding-top: 0 !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ===== R50：状态色块暗色适配（浅绿/浅灰/浅黄底在暗色下换半透明深色，保持语义可辨） ===== */
[data-theme="dark"] .badge.on,
[data-theme="dark"] .status-select.status-online { background: rgba(46,160,67,0.25); }
[data-theme="dark"] .badge.off,
[data-theme="dark"] .status-select.status-offline { background: rgba(158,158,158,0.2); }
[data-theme="dark"] .status-select.status-hidden { background: rgba(232,137,12,0.25); color: #ffb056; }
[data-theme="dark"] .badge.hidden { background: rgba(240,180,60,0.2); color: #ffcc80; }
