/* 设计师工作台(10-22; 方案 docs/DESIGNER-DESK-PLAN.md §5, 画板 A 桌面 / B 手机): public/designer-desk.js 的 #ddPage。
   复用 mold-task.css 的 .mt-btn / .mt-empty / .mt-sp / .mt-lnkbtn; 颜色只用 styles.css :root 令牌, 不写 hex。手机规则在文件末尾(同权重后写的赢)。 */
.dd-page { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 16px; color: var(--ink); min-width: 0; }
.dd-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dd-hello { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.dd-hello b { font-size: 20px; font-weight: 600; }
.dd-hello span { font-size: 12px; color: var(--muted); }
.dd-period { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 12px; color: var(--muted); }
.dd-period select { border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); }
.dd-period:focus-within { border-color: var(--primary-2); box-shadow: var(--ring); }

.dd-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 0; }
.dd-card.is-hot { border-color: var(--quad-red-line); }
.dd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dd-kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.dd-k { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-v { font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.dd-v small { font-size: 14px; font-weight: 400; color: var(--muted); }
.dd-d { font-size: 11px; color: var(--muted); }
.dd-d b { color: var(--good); font-weight: 600; }
.dd-d i { color: var(--bad); font-style: normal; font-weight: 600; }

.dd-main { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.dd-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dd-h { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); font-size: 14px; font-weight: 600; }
.dd-h small { min-width: 0; font-size: 12px; color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.dd-row:last-child { border-bottom: 0; }
.dd-row:hover { background: var(--soft); }
.dd-row.is-over { background: var(--tint-warm); }
.dd-pic { flex: 0 0 52px; height: 52px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--fill); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted-2); }
.dd-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dd-rm { flex: 1; min-width: 0; }
.dd-rm b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-rm small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-no { font-variant-numeric: tabular-nums; }
.dd-pill { flex: 0 0 auto; height: 18px; padding: 0 7px; border-radius: 99px; display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--line-soft); color: var(--muted); }
.dd-pill.is-warn, .dd-pill.is-me { background: var(--warn-soft); color: var(--warn); }
.dd-pill.is-bad { background: var(--bad-soft); color: var(--bad); }
.dd-row .mt-btn { flex: 0 0 auto; }
.dd-foot { padding: 6px 14px 10px; font-size: 12px; color: var(--muted); }

.dd-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dd-mini { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.dd-mini:hover { border-color: var(--primary-2); }
.dd-mini .dd-v { font-size: 22px; }
.dd-mini.is-hot { border-color: var(--quad-red-line); }
.dd-mini.is-hot .dd-v { color: var(--bad); }

.dd-lg { display: flex; gap: 12px; font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.dd-lg i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 2px; vertical-align: -1px; }
.dd-bars { display: flex; align-items: flex-end; gap: 10px; height: 110px; padding: 12px 18px 10px; }
.dd-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dd-st { width: 100%; height: 90px; display: flex; align-items: flex-end; gap: 2px; }
.dd-st i { flex: 1; display: block; min-height: 1px; border-radius: 3px 3px 0 0; }
.dd-bar small { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dd-page .is-dev { background: var(--primary); }
.dd-page .is-mold { background: var(--ink); }
.dd-page .is-sample { background: var(--good); }

.dd-files { display: flex; gap: 8px; padding: 12px 14px; overflow-x: auto; scroll-snap-type: x proximity; }
.dd-th { position: relative; flex: 0 0 84px; height: 84px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--fill); overflow: hidden; cursor: zoom-in; scroll-snap-align: start; }
.dd-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dd-th span { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 0 6px; border-radius: 5px; background: var(--surface); opacity: .92; font-size: 10px; color: var(--muted); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 768px) {   /* 手机(画板 B): 纵向堆叠; 必须写在上面桌面规则之后 */
  .dd-page { gap: 10px; padding-bottom: 12px; }
  .dd-top { align-items: flex-start; }
  .dd-hello { flex-direction: column; gap: 0; }
  .dd-hello b { font-size: 16px; }
  .dd-hello span { font-size: 11px; }
  .dd-period { height: 30px; padding: 0 10px; }
  .dd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dd-kpi { padding: 10px 12px; }
  .dd-v { font-size: 22px; }
  .dd-x, .dd-lg, .dd-row .dd-pill.is-n { display: none; }
  .dd-main { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .dd-col { gap: 10px; }
  .dd-row { min-height: 44px; padding: 8px 12px; }
  .dd-row .mt-btn { height: 36px; padding: 0 10px; }
  .dd-minis { gap: 8px; }
  .dd-mini { padding: 10px; }
  .dd-mini .dd-v { font-size: 20px; }
  .dd-bars { gap: 6px; padding: 10px 12px; }
  .dd-files { padding: 10px 12px; }
}
