/* 开模任务(设计师图纸模块第 3 期, 2026-09-30; 画板 C 板; 10-21 起看板退役, 这里只剩 按钮/徽标/详情叠层/录入页任务条/图纸网格/菜单红点 的共用规则; 帖子页样式在 mold-thread.css)
   全部走 styles.css 的 :root 设计令牌; 类名前缀 mt-(录入页任务条 me-tk-)。遮罩色是语义色, 就近定义一次。 */
:root { --mt-mask: rgba(37, 33, 29, 0.5); }

.mt-page { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mt-toprow { display: flex; align-items: flex-end; gap: 12px; }
.mt-toprow .tab-bar { margin: 0; flex: 1 1 auto; min-width: 0; }
.mt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.mt-sp { flex: 1 1 0; }
.mt-btn { height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.mt-btn:hover { color: var(--primary); }
.mt-btn.is-primary { background: var(--primary); border-color: var(--primary); color: var(--surface); font-weight: 600; }
.mt-btn.is-primary:hover { background: var(--cta-hover); color: var(--surface); }
.mt-btn.is-good { background: var(--good); border-color: var(--good); color: var(--surface); font-weight: 600; }
.mt-btn:disabled { opacity: .6; cursor: default; }
.mt-btn.is-sm { height: 28px; padding: 0 12px; }


.mt-btn.is-on { background: var(--primary-2); color: #fff; border-color: var(--primary-2); }
.mt-none { color: var(--muted-2); font-size: 12px; padding: 6px 2px; }

.mt-badge { height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; flex: 0 0 auto; }
.mt-badge.is-hot { background: var(--bad-soft); color: var(--bad); }
.mt-badge.is-idle { background: var(--fill, var(--thead)); color: var(--muted); }

.mt-empty { padding: 30px 12px; text-align: center; color: var(--muted-2); }
.mt-empty.is-err { color: var(--bad); }
.mt-foot { color: var(--muted-2); font-size: 12px; }

/* 详情叠层 */
.mt-dlg { width: min(720px, 96vw); max-height: 90vh; background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.mt-dhead { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--soft); border-bottom: 1px solid var(--line); min-width: 0; }
.mt-dhead h2 { margin: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mt-dhead small { color: var(--muted); white-space: nowrap; }
.mt-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; display: inline-flex; }
.mt-x:hover { color: var(--ink); }
.mt-dbody { padding: 14px 18px 18px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.mt-sec { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mt-sec i { width: 3px; height: 14px; border-radius: 2px; background: var(--primary); }
.mt-sec small { color: var(--muted-2); }
.mt-params2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.mt-params2 span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.mt-params2 small { color: var(--muted-2); }
.mt-lnk { color: var(--primary); text-decoration: none; }
.mt-lnk:hover { text-decoration: underline; }
.mt-muted { color: var(--muted-2); }
.mt-log { width: 100%; min-width: 0; border-collapse: collapse; font-size: 12px; }   /* 全局 table 有 min-width:960px, 叠层里必须压回 */
.mt-log th, .mt-log td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; overflow-wrap: anywhere; }
.mt-log th { background: var(--thead); color: var(--muted); font-weight: 600; }

/* 模具录入页: 页顶「我的开模任务」条 + 表单头任务条(mold-entry.js) */
.me-tasks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.me-tasks.hidden { display: none; }
.me-tasks > b { color: var(--muted); }
.me-tk-chip { height: 26px; padding: 0 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.me-tk-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-tk-chip small { color: var(--muted); }
.me-tk-chip .is-hot { color: var(--bad); font-weight: 600; }
.me-tk-chip.on { background: var(--primary-50); border-color: var(--primary); }
.me-tkbanner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius); background: var(--primary-50); border: 1px solid var(--primary-2); color: var(--warn); font-weight: 600; }
.me-tkbanner.hidden { display: none; }
.me-tkbanner span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-tkbanner button { border: 0; background: none; color: var(--warn); cursor: pointer; font: inherit; font-size: 16px; line-height: 1; padding: 0 4px; }

@media (max-width: 768px) {
  .mt-params2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mt-badge.is-warn { background: var(--warn-soft); color: var(--warn); }
.mt-badge.is-good { background: var(--good-soft); color: var(--good); }

/* 图纸库详情「开模任务」段(drawing-lib.js taskRow): 状态徽借 dl-tag, 补一个橙色档 */
.dl-tag.is-new { background: var(--warn-soft); color: var(--warn); }
.dl-task { padding: 4px 0; }
.dl-task b { font-weight: 600; }
.dl-task small { color: var(--muted); }
.mt-lnkbtn { border: 0; background: none; color: var(--primary); font: inherit; font-size: 12px; cursor: pointer; padding: 0 4px; }
/* 菜单红点(10-19 开发重规划二期): 开模任务 待接(设计师)/待关联(下需求的人) */
.mt-navdot { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--bad, #c0392b); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle; }
.rail-item { position: relative; }
.mt-navdot.is-rail { position: absolute; top: 2px; right: 2px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
/* 任务图纸区(10-20 两阶段 第 2 期, public/mold-task-file-ui.js) */
.mtf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 8px; }
.mtf-item { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.mtf-item a, .mtf-item .mtf-ico { display: flex; align-items: center; justify-content: center; height: 90px; background: var(--soft); color: var(--muted); font-size: 12px; }   /* --soft 是 styles.css 现有令牌 */
.mtf-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.mtf-item.is-missing { opacity: .55; }
.mtf-item figcaption { display: flex; align-items: center; gap: 6px; padding: 4px 6px; font-size: 11px; } .mtf-item figcaption small { color: var(--muted); flex: 1; }
.mtf-up { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; } .mtf-up input[type="file"] { display: none; } .mtf-up select { font: inherit; }
