/* ==========================================================
 * market.css —— 找报价（第三页）
 * 与 base.css 共用主题变量，不引入新色板
 * ========================================================== */

/* ---------- 页面骨架：与 css/index.css 的 .wrap / header 保持一致 ----------
   本页不引用 css/index.css（那里面是矩阵专用样式），所以在这里补齐骨架，
   数值逐条对齐 index.css 第 7–19 行，避免两页顶栏观感不一致。 */
.wrap { width: 100%; max-width: none; margin: 0 auto; padding: 24px 20px 60px; }
header {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px 20px; margin-bottom: 20px; box-shadow: var(--raised-1);
  position: relative; overflow: hidden;
}
/* 2026-10-25：去掉左侧 4px 品牌竖条 —— 新拟物禁止单侧强调条（靠光影与字重分层） */
header::before { display: none; }
header h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
header p { color: var(--muted); margin-top: 6px; font-size: 13px; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.mk-preview-badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(36,139,200,0.10); color: var(--brand);
  border: 1px solid transparent;
}
body.dark .mk-preview-badge { background: rgba(90,174,224,0.14); }

/* ========== 角色切换 ========== */
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.role-btn {
  position: relative; text-align: left; padding: 15px 18px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--card);
  box-shadow: var(--raised-1); cursor: pointer; color: var(--text);
  font-family: inherit; transition: box-shadow .3s ease-in-out, color .3s ease-in-out;
}
.role-btn b { display: block; font-size: 15px; font-weight: 600; }
.role-btn span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
/* hover 阴影缩小；❌ 不位移 */
.role-btn:hover { background: var(--card); box-shadow: 2px 2px 4px #b8bcc2, -2px -2px 4px #ffffff; }
/* 选中 = 按进表面（凹槽 + 更深的底 + 品牌字色），不用描边和左侧竖条 */
.role-btn.active { background: var(--sunken-bg); border-color: transparent; box-shadow: var(--sunken-1); }
.role-btn.active::before { display: none; }
.role-btn.active b { color: var(--brand); }
body.dark .role-btn:hover { box-shadow: 2px 2px 4px #212429, -2px -2px 4px #3a3f47; }

/* ========== 布局 ========== */
.mk-grid { display: grid; grid-template-columns: minmax(380px, 440px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .mk-grid { grid-template-columns: 1fr; } }

/* ========== 表单 ========== */
.mk-field { margin-bottom: 14px; }
.mk-field > label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
/* 含必填圆点的标签：改用 flex 按中线居中。
 * 2026-10-26：baseline 方案（vertical-align 0.18em）在 12px 标签上实测偏低，
 * 圆点中心要落在外框正中，只有 align-items:center 能稳定做到，且不随字号漂移。 */
.mk-field > label:has(> .req) { display: flex; align-items: center; gap: 5px; }
.mk-field > label:has(> .req) .req { margin-right: 0; }   /* 间距交给 gap，避免叠加 */
/* 必填标记：圆点样式在 base.css 的 .req（2026-10-26 全站统一，标记在文字前） */
.mk-field > label .req { margin-right: 5px; }/* ⚠️ 日期时间类的四种 type 必须全列在这里（2026-10-22 修）：
 *   原先只写了 date，漏掉 datetime-local → 「报价截止」拿到的是浏览器默认外观
 *   （高 19 / 宽按内容 162 / 圆角 0 / monospace 字体），和「开工日期」（39 高、撑满、13px）
 *   并排时一眼就是两个控件。以后新增任何 input type，都要同步进这一组。
 *   box-sizing 也在这里显式声明：日期控件在 Chrome 里默认 content-box，
 *   只靠全局 *{box-sizing} 未必命中内部 shadow 结构。 */
.mk-field input[type=text], .mk-field input[type=number],
.mk-field input[type=date], .mk-field input[type=datetime-local],
.mk-field input[type=time], .mk-field input[type=month],
.mk-field input[type=search], .mk-field input[type=email], .mk-field input[type=tel],
.mk-field select {
  width: 100%; padding: 9px 11px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--sunken-bg); color: var(--text); font-size: 13px; font-family: inherit; outline: none;
  box-sizing: border-box; min-width: 0;
  box-shadow: var(--sunken-1);
  /* 统一行高 = 统一控件高度（2026-10-22）：原先 text 37 / select 39 / date 40 三档，
     同一列字段左边缘对齐但底线错位。显式 line-height 让三种控件的盒高都落在 39。 */
  line-height: 19px;
}

/* 日期控件的原生内部结构（Chrome）：把 Chrome 自带的等宽字体与内边距抹掉，
   让「yyyy/mm/dd」与「yyyy/mm/dd --:--」用同一套字体、同一基线、同一图标尺寸。
   ⚠️ 垂直 padding 必须比文本框少 1px：Chrome 给 date/datetime-local 的匿名内部容器
   额外留了 2px，用同一套 padding 会高出 2px（实测 41 vs 39）。减 1px 后两者都是 39。
   ⚠️ color-scheme 决定日历图标用黑还是白：不声明时图标恒为黑色，
      深色主题下再叠 opacity 就几乎看不见（实测对比度 <1.5:1）。 */
.mk-field input[type=date], .mk-field input[type=datetime-local], .mk-field input[type=time], .mk-field input[type=month] {
  padding-top: 8px; padding-bottom: 8px;
  color-scheme: light;
}
body.dark .mk-field input[type=date], body.dark .mk-field input[type=datetime-local],
body.dark .mk-field input[type=time], body.dark .mk-field input[type=month] {
  color-scheme: dark;
}
.mk-field input[type=date]::-webkit-datetime-edit,
.mk-field input[type=datetime-local]::-webkit-datetime-edit,
.mk-field input[type=time]::-webkit-datetime-edit {
  padding: 0; font-family: inherit; font-size: inherit; line-height: inherit; color: inherit;
}
.mk-field input[type=date]::-webkit-calendar-picker-indicator,
.mk-field input[type=datetime-local]::-webkit-calendar-picker-indicator,
.mk-field input[type=time]::-webkit-calendar-picker-indicator {
  width: 15px; height: 15px; margin-left: 2px; opacity: .62; cursor: pointer;
}
.mk-field input[type=date]:hover::-webkit-calendar-picker-indicator,
.mk-field input[type=datetime-local]:hover::-webkit-calendar-picker-indicator,
.mk-field input[type=time]:hover::-webkit-calendar-picker-indicator { opacity: .92; }
.mk-field input:focus, .mk-field select:focus { border-color: transparent; box-shadow: var(--sunken-focus); }
.mk-field input[readonly] { background: var(--sunken-bg); color: var(--muted); }
.mk-field select option { background: var(--card); color: var(--text); }
.mk-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mk-tip { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.mk-tip.bad { color: var(--up); font-weight: 600; }
.mk-tip.good { color: var(--down); }

/* 静态说明块（不可交互的规则告知）：凹槽，不用左侧强调条 */
.mk-note {
  font-size: 12px; line-height: 1.65; color: var(--muted);
  border: 1px solid transparent; border-left: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 9px 12px; background: var(--sunken-bg);
  box-shadow: var(--sunken-1);
}
.mk-note b { color: var(--text); }

.mk-region-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.mk-region-row.with-btn { grid-template-columns: 1fr 1fr 1fr auto; }

/* ========== 开关 ========== */
/* 注意：必须比 `.mk-field > label`（0,2,1）更具体，否则 display:block 会把轨道与文字挤成两行 */
.mk-field > label.mk-switch {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 13px; font-weight: 400; color: var(--text); margin-bottom: 0; user-select: none;
}
.mk-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; user-select: none; }
.mk-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.mk-switch > span.track {
  display: block; width: 38px; height: 22px; border-radius: 999px; background: var(--btn); border: 1px solid var(--border-strong);
  position: relative; transition: .16s; flex: none;
}
.mk-switch > span.track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: .16s;
}
.mk-switch input:checked + span.track { background: var(--brand); border-color: transparent; }
.mk-switch input:checked + span.track::after { left: 18px; background: #f0f0f3; }

/* ========== 税率试算 ========== */
/* 金额试算：深色数据面板 + 青色文字（2026-10-26 用户约定 #4ecdc4）。
 * ⚠️ 为什么不是原来的浅灰凹槽：浅底上 #4ecdc4 只有 1.47:1，字迹发飘；
 *    换成深底后同一色号可达 8.6:1 —— 色号不变，只是给它一个能立住的底。
 * ⚠️ 空态（is-zero / is-empty）仍走灰色弱化：既有空态原则优先，
 *    不能让「0.00」比有值时更醒目。 */
/* 金额试算（2026-11-01 用户改定）：**浅色凹面 + 青的墨色字**。
 * 原来的深色面板在浅灰页面上像贴了块黑板 —— 那是为了迁就「#4ecdc4 只能压深底」做的妥协。
 * 反过来解决：底改浅（比卡片深一档，仍是双光源内凹），字用 --tint-ink（浅色下 #227771，5.05:1）。
 * 深色模式沿用深底 + 亮青，因为那边本来就是深表面。 */
.mk-calc {
  margin-top: 8px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: #dbe1e9;
  box-shadow: inset 4px 4px 8px #b8bcc2, inset -4px -4px 8px #ffffff;
  padding: 10px 12px; font-size: 12px; color: var(--tint-ink);
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
}
body.dark .mk-calc {
  background: #292d33;
  box-shadow: inset 4px 4px 8px #1d2025, inset -4px -4px 8px #343941;
}
.mk-calc dt { color: var(--tint-ink); }
.mk-calc dd { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--tint-ink); }
.mk-calc .total { color: var(--tint-ink); font-weight: 700; }
/* 空态（2026-10-27 用户改定）：**框内文字全用同一种颜色**，不再转灰 ——
 * 浅灰的 --muted 压在深色面板上本来就只剩 2.1:1，比"抢注意力"更糟。
 * 层级改由字重承担：数值 600、空值 500、含税总价 700。 */
.mk-calc dd.is-zero { font-weight: 500; }

/* ========== 拖放区 ========== */
.mk-drop { padding: 14px; font-size: 12px; }
.mk-drop .ic { font-size: 18px; }
.mk-drop.done { border-style: solid; border-color: var(--down); background: rgba(78,205,196,0.06); color: var(--down); }

/* ========== 经营地 chips ========== */
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; min-height: 30px; }
.mk-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: rgba(36,139,200,0.10); color: var(--brand); font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
}
body.dark .mk-chip { background: rgba(90,174,224,0.14); }
.mk-chip .lv { font-weight: 400; opacity: .7; font-size: 11px; }
.mk-chip button { background: none; border: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px; opacity: .6; }
.mk-chip button:hover { opacity: 1; }
.mk-empty-hint { font-size: 12px; color: var(--muted); padding: 4px 0; }

/* ========== 列表头 ========== */
.mk-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.mk-list-head h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.mk-search { width: 200px; padding: 8px 11px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--sunken-bg); color: var(--text); font-size: 13px; outline: none; box-shadow: var(--sunken-1); }
.mk-search:focus { border-color: transparent; box-shadow: var(--sunken-focus); }

/* ========== 需求卡片 ========== */
.mk-cards { display: flex; flex-direction: column; gap: 10px; }
/* 施工方列表：宽屏两栏，避免卡片被拉成整屏宽 */
#cList { display: grid; grid-template-columns: repeat(auto-fill, minmax(540px, 1fr)); gap: 12px; }
@media (max-width: 1180px) { #cList { grid-template-columns: 1fr; } }
.mk-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--raised-1); transition: box-shadow .3s ease-in-out;
  display: flex; flex-direction: column;
}
.mk-card:hover { background: var(--card); border-color: var(--line); box-shadow: 2px 2px 4px #b8bcc2, -2px -2px 4px #ffffff; }
body.dark .mk-card:hover { box-shadow: 2px 2px 4px #212429, -2px -2px 4px #3a3f47; }
.mk-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.mk-card-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-card-amount { text-align: right; flex: none; }
.mk-card-amount b { font-size: 16px; font-variant-numeric: tabular-nums; }
.mk-card-amount span { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.mk-card-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.mk-card-meta b { color: var(--text); font-weight: 600; }
.mk-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.mk-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--fill-hover); color: var(--muted); }
.mk-tag.warn { background: rgba(255,230,109,0.18); color: var(--warn); }
.mk-tag.ok { background: rgba(78,205,196,0.10); color: var(--down); }

/* ========== 状态 ========== */
.mk-status { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.s-open { background: rgba(36,139,200,0.12); color: var(--brand); }
/* 已截止·待开标：主题红**实底**（2026-10-26 用户指定）。
 * 与「流标」同用 --up，靠明度而非新色区分：实心 = 等你操作，浅底 = 终态。 */
.s-opening { background: var(--up); color: #ffffff; }
.s-closed { background: rgba(0,0,0,0.07); color: var(--muted); }
/* 已定标：Accent 3 青（2026-10-26 用户改定 —— 与「成功/已匹配」同色系，靠所在位置区分：
 * 状态徽标 vs 表格单元格，不会出现在同一视觉焦点）。
 * 底色用该色 18%，文字加深到同族 #227771 —— 11px 字直接染 #4ecdc4 只有 1.54:1。 */
.s-awarded { background: rgba(78,205,196,0.18); color: var(--down); }
body.dark .s-awarded { background: rgba(121,217,210,0.16); color: var(--down); }
.s-failed { background: rgba(219,0,0,0.12); color: var(--up); }
body.dark .s-closed { background: rgba(255,255,255,0.10); }
body.dark .s-opening { background: var(--up); color: #2b2f36; }   /* 深色 --up 是浅红，配深字 */

/* ========== 空态 ========== */
.mk-empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13px; }
.mk-empty .ic { font-size: 26px; display: block; margin-bottom: 8px; color: var(--tint); opacity: .95; }

/* ========== 提示条 ========== */
.mk-toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(8px);
  background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transition: .2s; z-index: 200;
}
.mk-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========== 页脚 ========== */
.mk-foot { margin-top: 28px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.8; }

/* ==========================================================
 * 凸凹材质补丁（2026-10-21）：输入凹、卡片与胶囊凸
 * ========================================================== */
/* ⚠️ 这里的 type 列表必须与上面「表单」基础组**完全一致**：
   基础组给了 box 样式（有框），这里给凹面（沉下去）。漏一个就会出现「有框但不凹」，
   在一排凹陷输入框里显得像浮起来的异类。 */
.mk-field input[type=text], .mk-field input[type=number],
.mk-field input[type=date], .mk-field input[type=datetime-local],
.mk-field input[type=time], .mk-field input[type=month],
.mk-field input[type=search], .mk-field input[type=email], .mk-field input[type=tel],
.mk-field select, .mk-search {
  background: var(--sunken-bg); box-shadow: var(--sunken-1);
}
.mk-field input:focus, .mk-field select:focus, .mk-search:focus { box-shadow: var(--sunken-focus); }

/* 税率试算：一块「数据槽」 */
.mk-calc { box-shadow: var(--sunken-1); }
/* 经营地胶囊：小凸片 */
.mk-chip { box-shadow: var(--raised-1); }
/* 开关：轨道凹、滑块凸 */
.mk-switch > span.track { box-shadow: var(--sunken-1); }
.mk-switch > span.track::after { box-shadow: var(--raised-1); }
/* 静态说明块：浅凹，读起来像「贴在卡面上的说明纸」 */
.mk-note { box-shadow: var(--sunken-1); }

/* ========== 空态线性图标（2026-10-21） ========== */
.mk-empty .ic .qc-ico { display: block; margin: 0 auto; }
.mk-card-meta .qc-ico { color: var(--muted); }

/* ========== 需求大厅（首页，2026-10-25） ========== */
/* 筛选条：一块凸面工具条，地区与搜索同排；窄屏换行 */
.mk-home-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 4px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--raised-1);
}
.mk-home-filter { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-home-label { font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.mk-home-filter .mk-region-row { width: 420px; max-width: 60vw; }
@media (max-width: 720px) { .mk-home-filter .mk-region-row { width: 100%; max-width: none; } }

/* 大厅列表：宽屏两栏（与「可投项目」一致，避免单列被拉成整屏宽） */
.mk-home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(540px, 1fr)); gap: 12px; }
@media (max-width: 1180px) { .mk-home-cards { grid-template-columns: 1fr; } }

/* 右侧地区说明：弱化，不抢「需求清单」标题 */
.mk-home-sub { font-size: 12px; color: var(--muted); }

/* 视图切换：只切 display，不重建 DOM（表单里填到一半的内容不会丢） */
.mk-view.hidden { display: none !important; }

/* 窄屏视图切换（宽屏用左侧 rail 二级菜单，这里默认不显示） */
.mk-tabs { display: none; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.mk-tab {
  padding: 7px 14px; border-radius: var(--radius-sm); text-decoration: none;
  font-size: 12.5px; color: var(--muted); background: var(--card); box-shadow: var(--raised-1);
  border: 1px solid var(--line);
}
.mk-tab:hover { color: var(--text); }
.mk-tab.active { color: var(--brand); font-weight: 600; background: var(--sunken-bg); box-shadow: var(--sunken-1); border-color: transparent; }
@media (max-width: 1080px) { .mk-tabs { display: flex; } }

/* 发布表单：单栏限宽（原右栏「我发布的需求」已拆成三级菜单，2026-10-25） */
/* ==========================================================
 * 两栏骨架（2026-10-26）：发布页 / 我的需求页 = 主内容 + 侧栏
 * ------------------------------------------------------------
 * 原先发布页锁 760px、我的需求页单列，1440 下右侧空 300~700px。
 * 现在：宽屏并排（主列 ≤760 + 侧栏 280~336），窗口不够宽时由媒体查询落成一栏。
 * 断点依据：主列最小 736 + gap 16 + 侧栏最小 280 = 1032 内容宽；
 *   再加侧栏 220 与页面内边距 40 → 视口 < 1300 即切线。
 * ========================================================== */
/* 2026-10-29：宽屏下容器居中（原先左对齐，右侧留白全部堆在右边） */
.mk-publish-wrap { max-width: 1112px; margin: 0 auto; }
.mk-split {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(280px, 336px);
  gap: 16px;
  align-items: start;
}
.mk-split > .mk-split-main { min-width: 0; }
.mk-split > .mk-split-side {
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0; position: sticky; top: 16px;
}
/* 「我发布的需求」主列吃掉剩余宽度（列表比表单需要更宽） */
.mk-split-wide { grid-template-columns: minmax(0, 1fr) minmax(280px, 336px); max-width: none; }
@media (max-width: 1300px) {
  /* 2026-10-29：落差成单列后必须居中，否则整块贴左、右侧空出一大片（用户实测 1070 宽时右侧空 470px）；
     同时把上限从 860 提到 900，让单列不至于过窄。 */
  .mk-split { grid-template-columns: 1fr; max-width: 900px; margin-left: auto; margin-right: auto; }
  /* 「我发布的需求」列表要吃掉整行，不受上面的 900 限制 */
  .mk-split-wide { grid-template-columns: 1fr; max-width: none; }
  /* 落成一栏后，侧栏两张卡若有空间仍并排（860 → 各 420），更窄才继续堆叠 */
  .mk-split > .mk-split-side {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
  }
}

/* 侧栏里的流程时间线 */
.mk-flow { list-style: none; margin: 8px 0 0; padding: 0; }
.mk-flow li {
  position: relative; padding: 0 0 14px 22px;
  font-size: 12px; line-height: 1.65; color: var(--muted);
}
.mk-flow li:last-child { padding-bottom: 0; }
/* 节点标记：四角星 + 图标青（2026-10-26 全站统一；原为蓝色圆点）
   尺寸 9px，与规则清单保持同一大小；中心 x=5.5，竖线压在 5px */
.mk-flow li::before {
  content: ''; position: absolute; left: 1px; top: 4px; width: 9px; height: 9px;
  background: var(--tint);
  clip-path: var(--star4);
}
.mk-flow li::after {
  content: ''; position: absolute; left: 5px; top: 15px; bottom: 2px;
  width: 1px; background: var(--border-strong);
}
.mk-flow li:last-child::after { display: none; }
.mk-flow b { display: block; font-size: 12px; color: var(--text); font-weight: 600; margin-bottom: 1px; }

/* 侧栏里的规则清单 */
.mk-rulelist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mk-rulelist li {
  position: relative; padding-left: 14px;
  font-size: 12px; line-height: 1.65; color: var(--muted);
}
/* 同一套标记：四角星，不另造形状（尺寸与时间线一致 9px） */
.mk-rulelist li::before {
  content: ''; position: absolute; left: 0; top: 7px; width: 9px; height: 9px;
  background: var(--tint);
  clip-path: var(--star4);
}
.mk-rulelist b { color: var(--text); font-weight: 600; }

/* ==========================================================
 * 发布表单排版（2026-10-25 优化）
 * 单栏 760px 太长 → 分三节（基本信息 / 价格与规则 / 清单与图纸），
 * 税率与试算并排、规则与 N 并排，提交按钮单独收口。
 * ========================================================== */
.mk-sec { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.mk-sec:first-of-type { margin-top: 10px; padding-top: 0; border-top: none; }

.mk-sec-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.mk-sec-head b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.mk-sec-head span { font-size: 11.5px; color: var(--muted); }

/* 税率（窄）+ 试算（宽）：并排省掉一整块垂直空间 */
.mk-tax-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: start; }
.mk-tax-row .mk-field { margin-bottom: 0; }
.mk-tax-row .mk-calc { margin-top: 0; }

/* 入围规则 + N：N 固定窄列，manual 时整行只剩下拉 */
.mk-rule-row { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 10px; align-items: start; }
.mk-rule-row > div { min-width: 0; }
.mk-rule-row input[type=number] { width: 100%; }

/* 提交区：提示在左、按钮在右，与上方字段用一条线分开 */
.mk-submit-row {
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line);
}
.mk-submit-row .mk-tip { margin: 0; }
/* .btn-lg 默认 width:100%（为登录页那种整行主按钮设计的），这里只占右侧固定宽 */
.mk-submit-row .btn-lg { width: auto; min-width: 176px; flex: none; }
/* 拖放区比普通输入框高一档：太扁不利于拖拽，也和「点击选择」的语义不匹配 */
#viewPublish .mk-drop { min-height: 56px; display: flex; align-items: center; justify-content: center; }

@media (max-width: 720px) {
  .mk-tax-row { grid-template-columns: 1fr; }
  .mk-rule-row { grid-template-columns: minmax(0, 1fr) 100px; }
  .mk-submit-row { flex-wrap: wrap; justify-content: flex-start; }
}

/* ==========================================================
 * 发布表单：工期 + 大拖框 + 清单预览（2026-10-25）
 * ========================================================== */

/* 报价截止 / 开工日期 / 工期 三列 */
.mk-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) {
  .mk-row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-row3 > .mk-field:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .mk-row3 { grid-template-columns: 1fr; }
  .mk-row3 > .mk-field:last-child { grid-column: auto; }
}

/* 工期：数字 + 单位 */
.mk-days-row { display: flex; align-items: center; gap: 8px; }
.mk-days-row input { flex: 1 1 auto; min-width: 0; }
.mk-days-unit { flex: none; font-size: 13px; color: var(--muted); }

/* 大拖放框：图标 + 主文案 + 副文案，竖排居中 */
#viewPublish .mk-drop-lg {
  min-height: 104px; padding: 18px 14px;
  flex-direction: column; gap: 4px; text-align: center;
}
.mk-drop-ico { width: 26px; height: 26px; color: var(--tint); opacity: .95; }
.mk-drop-lg b { font-size: 13px; font-weight: 600; color: var(--text); }
.mk-drop-lg i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.mk-drop-lg.done b { color: var(--down); }
.mk-drop-lg.done .mk-drop-ico { color: var(--down); }

/* 清单入库状态 */
.mk-sheet-status {
  margin-top: 8px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: rgba(78,205,196,0.08); color: var(--down);
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.mk-sheet-status.is-warn { background: rgba(255,230,109,0.18); color: var(--warn); }
body.dark .mk-sheet-status { background: rgba(121,217,210,0.14); color: #79d9d2; }
body.dark .mk-sheet-status.is-warn { background: rgba(255,230,109,0.18); color: var(--warn); }

.mk-sheet-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.mk-sheet-ok { font-size: 12px; font-weight: 600; color: var(--down); }
body.dark .mk-sheet-ok { color: #79d9d2; }

/* 清单预览弹层 */
.mk-preview-box {
  width: min(980px, 94vw); max-height: 86vh;
  display: flex; flex-direction: column;
}
.mk-preview-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.mk-preview-meta b { color: var(--text); }
.mk-preview-wrap {
  flex: 1 1 auto; min-height: 200px; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.mk-preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mk-preview-table th, .mk-preview-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top;
}
.mk-preview-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--card); font-weight: 600; color: var(--text);
}
.mk-preview-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-preview-table td.ctr { text-align: center; white-space: nowrap; }
.mk-preview-table tr:last-child td { border-bottom: none; }
.mk-preview-tip { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.mk-preview-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ==========================================================
 * 招标文件识别结果（2026-10-25）
 * 两列清单：识别到的显示值 + 来源（规则/模型），没识别到的用虚线框提示手填。
 * ========================================================== */
.mk-tender-report {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px;
}
.mk-tender-report li {
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--sunken-bg); box-shadow: var(--sunken-1);
  font-size: 12px;
}
.mk-tender-report li b { flex: none; font-weight: 600; color: var(--muted); }
.mk-tender-report li span {
  min-width: 0; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mk-tender-report li i { margin-left: auto; flex: none; font-style: normal; font-size: 10.5px; color: var(--muted); }
.mk-tender-report li.ok i { color: var(--brand); }
.mk-tender-report li.miss { background: transparent; box-shadow: none; border: 1px dashed var(--border-strong); }
.mk-tender-report li.miss span { color: var(--muted); }
@media (max-width: 760px) { .mk-tender-report { grid-template-columns: 1fr; } }

/* 拖入文件时的高亮（三个上传区共用） */
.mk-drop.is-over { border-color: var(--brand); color: var(--brand); }

/* ==========================================================
 * 项目类型：一级序列（分段按钮）→ 二级资质（下拉）（2026-10-25）
 * 一级用 .seg 复用主题切换的凹槽+凸起材质；计数徽标用 em 弱化。
 * 未选序列时二级下拉禁用，只显示引导文案。
 * ========================================================== */
.mk-type-seg { width: 100%; margin-bottom: 8px; }
.mk-type-seg .seg-item {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 10px; font-size: 13px;
}
.mk-type-seg .seg-item em {
  font-style: normal; font-size: 11px; line-height: 1.7; padding: 0 6px;
  border-radius: 9px; background: var(--sunken-bg); color: var(--muted);
}
.mk-type-seg .seg-item.active em { color: var(--brand); }
/* 二级下拉的禁用态：一眼看出「先选上面」而不是可点却没反应 */
.mk-field select:disabled { color: var(--muted); cursor: not-allowed; opacity: .8; }

/* ==========================================================
 * 我的需求：卡片操作组 + 修改弹层（2026-11-03）
 * 起因：发布后的需求只能"查看报价"，找不到删除 / 暂停 / 修改的入口。
 * 位置：卡片 footer 右端，与「查看报价」同一行；窄屏自然折行。
 * ========================================================== */
.mk-card-acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.mk-card-acts .btn { flex: none; }
/* 关闭 / 删除：危险动作只用红字，不铺红底（避免和「已截止」实底徽标抢视觉） */
.mk-card-acts .mk-op-danger { color: var(--up); }
.mk-card-acts .mk-op-danger:hover { background: rgba(255,107,107,0.12); }

/* 已暂停：黄底深黄字（C58 第 4 色「警告」），与「已截止」的灰、「开标中」的红实底互不混淆 */
.s-paused { background: rgba(255,230,109,0.32); color: var(--warn); }
body.dark .s-paused { background: rgba(255,230,109,0.18); color: #ffe66d; }

/* 修改需求弹层 */
.mk-edit-box { width: min(720px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
.mk-edit-body { flex: 1 1 auto; overflow: auto; padding-right: 4px; }
.mk-edit-body .mk-row3 { margin-bottom: 12px; }
/* 清单锁提示：不是错误，是"此处不可改"的说明，用中性底 + 左侧竖线 */
.mk-edit-lock {
  margin: 4px 0 10px; padding: 10px 12px; font-size: 12px; line-height: 1.7;
  color: var(--muted); background: var(--sunken-bg); border-radius: var(--radius-sm);
  box-shadow: var(--sunken-1); border-left: 3px solid var(--warn);
}
.mk-edit-lock b { color: var(--text); }
#deErr:empty { display: none; }

/* 窄屏：操作按钮换行后靠左，避免和标签挤在同一行 */
@media (max-width: 640px) {
  .mk-card-foot { flex-wrap: wrap; }
  .mk-card-acts { width: 100%; justify-content: flex-start; }
}

/* 修改弹层：三列里两个是日期控件，等宽会挤掉日历图标（Chrome 实测 2026/12/20/ 被截）
   截止给最宽、工期最窄，日期字号降 0.5px 再省一点横向空间 */
.mk-edit-body .mk-row3 { grid-template-columns: 1.25fr 1.18fr 0.72fr; }
.mk-edit-body input[type="date"], .mk-edit-body input[type="datetime-local"] { font-size: 12.5px; padding-left: 8px; padding-right: 6px; }

/* 窄屏：弹层内的三列要回到 2 列 / 1 列（上面的 1.25fr 规则特异性更高，必须显式覆盖） */
@media (max-width: 900px) {
  .mk-edit-body .mk-row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-edit-body .mk-row3 > .mk-field:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .mk-edit-body .mk-row3 { grid-template-columns: 1fr; }
  .mk-edit-body .mk-row3 > .mk-field:last-child { grid-column: auto; }
}
