/* ============================================================
   手机查询端（2026-09-15，WM-01~06）
   设计稿：五屏 首页 / 项目 / 物料 / 单号 / 任务。全部只读。
   颜色一律取 bom.css 的 --bom-* 令牌，不另起一套；类名统一 mq- 前缀，
   不用组件隔离 CSS（.razor.css 碰到子组件要 ::deep，第十一阶段踩过）。
   页面在电脑上打开也能看：最大宽度 560px 居中，不会拉成一条横幅。
   ============================================================ */

.mq { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; font-size: .9rem; }
.mq-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -.01em; }
.mq-num { font-variant-numeric: tabular-nums; }
.mq-muted { color: var(--bom-muted); }

/* 页头 */
.mq-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 2px 0; }
.mq-head-sub { font-size: .78rem; color: var(--bom-muted); }
.mq-head-title { font-size: 1.45rem; font-weight: 800; line-height: 1.2; color: #0f172a; margin: 0; }
.mq-back { display: inline-flex; align-items: center; gap: 2px; color: var(--bom-primary); font-size: .88rem; background: none; border: 0; padding: 6px 4px 6px 0; min-height: 36px; }

/* 搜索框：首页主角，占满一行 */
.mq-search { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 6px 0 14px; background: #fff; border: 1.5px solid var(--bom-primary); border-radius: 14px; }
.mq-search > .bi { color: var(--bom-muted); font-size: 1.05rem; }
.mq-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1rem; padding: 10px 0; }
.mq-search button { min-width: 44px; min-height: 38px; border: 0; border-radius: 10px; background: var(--bom-primary); color: #fff; font-weight: 600; padding: 0 12px; }
.mq-search button.clear { background: transparent; color: var(--bom-muted); padding: 0 8px; }
.mq-search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bom-primary) 18%, transparent); }

/* 卡片与分组 */
.mq-card { background: #fff; border: 1px solid var(--bom-border); border-radius: 14px; }
.mq-pad { padding: 12px 14px; }
.mq-sec { display: flex; flex-direction: column; gap: 6px; }
.mq-sec-h { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; padding: 0 2px; color: #1f2937; }
.mq-sec-h .more { margin-left: auto; font-weight: 400; font-size: .8rem; color: var(--bom-muted); background: none; border: 0; padding: 4px 0 4px 8px; display: inline-flex; align-items: center; gap: 2px; }
.mq-empty { padding: 18px 14px; text-align: center; color: var(--bom-muted); font-size: .85rem; }
.mq-denied { padding: 12px 14px; color: var(--bom-muted); font-size: .82rem; display: flex; gap: 6px; align-items: center; }

/* 状态：点 + 字，永远不只靠颜色 */
.mq-pill { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; white-space: nowrap; line-height: 1.6; }
.mq-pill.danger { color: #dc2626; background: #fdecec; }
.mq-pill.warn { color: #c2410c; background: #fdefe6; }
.mq-pill.attn { color: #0369a1; background: #e0f2fe; }
.mq-pill.ok { color: #15803d; background: #e8f6ed; }
.mq-pill.info { color: var(--bom-primary); background: var(--bom-primary-050); }
.mq-pill.idle { color: #64748b; background: #eef2f7; }
.mq-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #cbd5e1; }
.mq-dot.danger { background: #dc2626; } .mq-dot.warn { background: #ea580c; } .mq-dot.ok { background: #16a34a; } .mq-dot.attn { background: #0ea5e9; }

.mq-meter { height: 6px; background: #e8ecf2; border-radius: 3px; overflow: hidden; }
.mq-meter > i { display: block; height: 100%; background: var(--bom-primary); border-radius: 3px; }
.mq-meter.danger > i { background: #dc2626; }
.mq-meter.warn > i { background: #ea580c; }
.mq-meter.ok > i { background: #16a34a; }

/* 分段切换 */
.mq-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #e9edf3; border-radius: 10px; padding: 3px; gap: 3px; }
.mq-seg button { border: 0; background: transparent; border-radius: 8px; min-height: 34px; font-size: .82rem; color: var(--bom-muted); }
.mq-seg button.on { background: #fff; color: #1f2937; font-weight: 700; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.mq-seg b { color: #dc2626; margin-left: 4px; }

/* 可点的行 / 卡片 */
.mq-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mq-tap:active { background: #f8fafc; }
.mq-chev { color: #c3cad5; font-size: .85rem; flex: none; }

/* 行列表 */
.mq-rows > .mq-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 44px; }
.mq-rows > .mq-row + .mq-row { border-top: 1px solid var(--bom-border); }
.mq-row .grow { flex: 1; min-width: 0; }
.mq-row .t { font-size: .88rem; color: #1f2937; overflow-wrap: anywhere; }
.mq-row .s { font-size: .75rem; color: var(--bom-muted); overflow-wrap: anywhere; }
.mq-row .r { text-align: right; white-space: nowrap; font-size: .85rem; }

/* 首页：待办数 */
.mq-todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mq-todo > div { background: #fff; border: 1px solid var(--bom-border); border-radius: 12px; padding: 8px 10px; }
.mq-todo b { display: block; font-size: 1.3rem; font-weight: 800; line-height: 1.2; color: var(--bom-primary); }
.mq-todo b.zero { color: #cbd5e1; }
.mq-todo span { font-size: .72rem; color: var(--bom-muted); }

/* 项目卡 */
.mq-proj { padding: 11px 14px; display: flex; flex-direction: column; gap: 7px; }
.mq-proj + .mq-proj { margin-top: 8px; }
.mq-proj .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mq-proj .name { font-weight: 700; font-size: .95rem; color: #1f2937; overflow-wrap: anywhere; }
.mq-proj .sub { font-size: .75rem; color: var(--bom-muted); }
.mq-proj .foot { display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; color: var(--bom-muted); flex-wrap: wrap; }
.mq-proj .foot b { color: #1f2937; }
.mq-proj .foot .late { color: #dc2626; font-weight: 700; }

/* 项目详情头 */
.mq-kpis { display: grid; grid-template-columns: repeat(3, 1fr); }
.mq-kpis > div { padding: 0 10px; }
.mq-kpis > div:first-child { padding-left: 0; }
.mq-kpis > div + div { border-left: 1px solid var(--bom-border); }
.mq-kpis b { display: block; font-size: 1.2rem; font-weight: 800; line-height: 1.25; color: #1f2937; }
.mq-kpis b.late { color: #dc2626; }
.mq-kpis span { font-size: .72rem; color: var(--bom-muted); }
.mq-next { padding: 10px 14px; background: #fdecec; border-color: transparent; display: flex; gap: 8px; font-size: .85rem; color: #7f1d1d; }
.mq-next.warn { background: #fdefe6; color: #7c2d12; }
.mq-next > .bi { color: #dc2626; margin-top: 1px; }
.mq-next.warn > .bi { color: #ea580c; }

/* 物料三格 */
.mq-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mq-stats > div { background: var(--bom-bg); border-radius: 10px; padding: 7px 10px; }
.mq-stats b { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.25; color: #1f2937; }
.mq-stats b.warn { color: #ea580c; }
.mq-stats span { font-size: .72rem; color: var(--bom-muted); }

/* 单据信息 */
.mq-kv { display: grid; grid-template-columns: 72px 1fr; gap: 4px 10px; font-size: .85rem; margin: 0; }
.mq-kv dt { color: var(--bom-muted); font-weight: 400; }
.mq-kv dd { margin: 0; overflow-wrap: anywhere; }

/* 单据链竖线 */
.mq-chain { padding: 12px 14px 2px; }
.mq-step { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; position: relative; padding-bottom: 14px; }
.mq-step::before { content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--bom-border); }
.mq-step:last-child::before { display: none; }
.mq-step .node { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #16a34a; color: #fff; font-size: .7rem; margin-top: 1px; }
.mq-step.partial .node { background: #ea580c; }
.mq-step.draft .node { background: #94a3b8; }
.mq-step.waiting .node { background: #fff; border: 2px dashed #b8c1ce; }
.mq-step .what { font-size: .88rem; font-weight: 700; color: #1f2937; }
.mq-step.waiting .what { color: var(--bom-muted); }
.mq-step .det { font-size: .75rem; color: var(--bom-muted); overflow-wrap: anywhere; }
.mq-step .when { font-size: .75rem; color: var(--bom-muted); white-space: nowrap; }

/* 任务 */
.mq-buckets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mq-buckets button { background: #fff; border: 1px solid var(--bom-border); border-radius: 10px; padding: 5px 0; font-size: .72rem; color: var(--bom-muted); min-height: 50px; }
.mq-buckets b { display: block; font-size: 1.1rem; font-weight: 800; color: #1f2937; line-height: 1.3; }
.mq-buckets .late b { color: #dc2626; } .mq-buckets .block b { color: #ea580c; }
.mq-buckets button.on { border-color: var(--bom-primary); box-shadow: inset 0 0 0 1px var(--bom-primary); }
.mq-grp { font-size: .75rem; font-weight: 700; color: var(--bom-muted); letter-spacing: .04em; padding: 4px 2px 0; }
.mq-task { padding: 10px 14px; display: flex; flex-direction: column; gap: 5px; }
.mq-task .top { display: flex; gap: 8px; align-items: baseline; }
.mq-task .wbs { font-size: .75rem; color: var(--bom-muted); }
.mq-task .name { font-weight: 700; font-size: .9rem; color: #1f2937; overflow-wrap: anywhere; }
.mq-task .meta { display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; color: var(--bom-muted); flex-wrap: wrap; }
.mq-task .why { font-size: .8rem; color: #c2410c; }
.mq-task .late { color: #dc2626; font-weight: 700; }

/* 搜索结果分组标题 */
.mq-kind { font-size: .72rem; font-weight: 700; color: var(--bom-muted); letter-spacing: .06em; padding: 6px 2px 0; }

.mq-foot-link { text-align: center; font-size: .8rem; padding: 4px 0 8px; }
.mq-more-btn { width: 100%; min-height: 44px; border: 1px dashed var(--bom-border); background: #fff; border-radius: 12px; color: var(--bom-primary); font-size: .85rem; }

.mq-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 24px 0; color: var(--bom-muted); font-size: .85rem; }
