/* ===========================================================
 *  采购管理模块样式
 *  —— 采购台账进度、阶段时间线、资料卡、限额表、制度纸张、模版卡
 * =========================================================== */

/* ---------- 台账 ---------- */
.pg-table tbody tr:hover{ background: #FBFCFE; }
.pg-prog{ height: 5px; border-radius: 99px; background: #EEF2F8; overflow: hidden; }
.pg-prog i{ display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg,#2F6BFF,#5B8DFF); }
.pg-prog-t{ font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.pg-docn{
  display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px;
  background: #EEF3FB; color: #40628F; margin-left: 6px;
}

/* ---------- 采购方式速查 ---------- */
.pg-calc{ display: flex; align-items: center; gap: 18px; padding: 14px 16px; margin-bottom: 16px; box-shadow: none; border: 1px solid #E3EAF5; background: #FAFCFF; }
.pg-calc-l b{ font-size: 14px; }
.pg-calc-l p{ font-size: 12px; color: var(--muted); margin-top: 3px; }
.pg-calc-r{ margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pg-calc-out{ font-size: 12.5px; color: var(--ink2); display: flex; align-items: center; gap: 8px; min-width: 220px; }
.pg-calc-out i{ font-style: normal; color: var(--muted); }

.pg-limit{ margin-bottom: 18px; }
.pg-methods{ display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.pg-method{ border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: #fff; }
.pg-method-hd{ display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pg-method-hd b{ font-size: 13.5px; }
.pg-method p{ font-size: 12.5px; color: var(--ink2); line-height: 1.7; }
.pg-method-st{ margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.8; border-top: 1px dashed var(--line); padding-top: 7px; }

/* ---------- 制度纸张 ---------- */
.pg-pol-bar{ display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pg-paper-wrap{ background: #F7F8FA; border: 1px solid var(--line); border-radius: 12px; padding: 18px; max-height: 62vh; overflow: auto; }
.pg-paper{
  background: #fff; max-width: 780px; margin: 0 auto; padding: 36px 44px 40px;
  box-shadow: 0 2px 14px rgba(15,23,42,.07); border-radius: 4px;
  font-family: "Songti SC","SimSun",serif; color: #111;
}
.pg-paper h1{ font-size: 21px; text-align: center; font-family: "Heiti SC","SimHei",sans-serif; letter-spacing: 2px; margin-bottom: 8px; }
.pg-paper-sub{ text-align: center; font-size: 10.5px; color: #666; margin-bottom: 22px; }
.pg-paper h2{ font-size: 14px; font-family: "Heiti SC","SimHei",sans-serif; margin: 18px 0 8px; }
.pg-paper p{ font-size: 13px; line-height: 1.95; text-indent: 2em; text-align: justify; margin-bottom: 7px; }
.pg-papertb{ width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 12px; }
.pg-papertb th, .pg-papertb td{ border: 1px solid #999; padding: 6px 9px; vertical-align: top; }
.pg-papertb th{ background: #F4F4F4; font-family: "Heiti SC","SimHei",sans-serif; }
.pg-paper-foot{ margin-top: 18px; padding-top: 8px; border-top: 1px dashed #BBB; font-size: 11.5px; color: #444; }

/* ---------- 模版卡 ---------- */
.pg-tpl-grid{ display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.pg-tpl{ padding: 15px 16px; box-shadow: none; border: 1px solid var(--line); }
.pg-tpl-hd b{ font-size: 13.5px; }
.pg-tpl-hd p{ font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.65; }
.pg-tpl-ft{ display: flex; gap: 8px; margin-top: 12px; }

/* ---------- 详情弹窗 ---------- */
.pg-detail{ max-height: 66vh; overflow: auto; }
.pg-detail-top{ display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.pg-rulebox{ flex: 1 1 300px; background: var(--primary-soft); border-radius: 11px; padding: 10px 13px; }
.pg-rulebox span{ font-size: 11px; color: #40628F; letter-spacing: .5px; }
.pg-rulebox p{ font-size: 12.5px; color: #2C4A78; margin-top: 4px; line-height: 1.7; }
.pg-progbox{ flex: 1 1 240px; display: flex; flex-direction: column; justify-content: center; }
.pg-need, .pg-sups{ border: 1px solid var(--line); border-radius: 11px; padding: 11px 14px; margin-bottom: 12px; }
.pg-need b, .pg-sups b{ font-size: 12.5px; }
.pg-need p{ font-size: 12.5px; color: var(--ink2); margin-top: 4px; line-height: 1.75; }
.pg-sup-list{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.pg-sup{ font-size: 12px; background: #F3F6FB; border-radius: 8px; padding: 4px 10px; color: #34506F; }
.pg-sups .btn{ margin-top: 8px; }

.pg-sec-hd{ display: flex; align-items: baseline; gap: 10px; margin: 16px 0 9px; }
.pg-sec-hd b{ font-size: 13.5px; }
.pg-sec-hd .hint{ margin: 0; }

.pg-tl{ border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pg-tl-row{ display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.pg-tl-row:last-child{ border-bottom: none; }
.pg-tl-row.cur{ background: #FBFAF4; }
.pg-tl-row.todo{ opacity: .72; }
.pg-tl-dot{
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 600; background: #EEF2F8; color: #64748B; margin-top: 2px;
}
.pg-tl-row.done .pg-tl-dot{ background: var(--green-soft); color: var(--green); }
.pg-tl-row.cur .pg-tl-dot{ background: var(--primary); color: #fff; }
.pg-tl-main{ flex: 1; min-width: 0; }
.pg-tl-t{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pg-tl-t b{ font-size: 13.5px; font-weight: 600; }
.pg-tl-s{ font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.7; }
.pg-tl-act{ display: flex; flex-direction: column; gap: 6px; justify-content: center; }

.pg-docs{ display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.pg-doc{
  display: inline-flex; align-items: center; gap: 6px; max-width: 260px;
  border: 1px solid var(--line); border-radius: 9px; padding: 4px 8px; font-size: 11.5px;
  background: #FBFCFE; cursor: pointer;
}
.pg-doc:hover{ border-color: var(--primary); }
.pg-doc em{ font-style: normal; }
.pg-doc span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-doc a{ color: var(--primary); text-decoration: none; }
.pg-doc i{ font-style: normal; color: #B0BBCB; cursor: pointer; }
.pg-doc i:hover{ color: var(--red); }

.pg-up{ display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 11px 13px; border: 1px dashed #CFDAE9; border-radius: 11px; background: #FBFCFE; }
.pg-log{ border: 1px solid var(--line); border-radius: 11px; padding: 8px 13px; }
.pg-log-row{ display: flex; gap: 9px; font-size: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pg-log-row:last-child{ border-bottom: none; }
.pg-log-row span{ color: var(--muted); flex: 0 0 118px; }
.pg-log-row b{ flex: 0 0 58px; font-weight: 600; }
.pg-log-row i{ font-style: normal; color: var(--ink2); }
.pg-danger{ display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pg-danger .hint{ margin: 0; flex: 1; }

/* ---------- 新建表单 ---------- */
.pg-radios{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.pg-radio{
  display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12.5px;
}
.pg-radio input{ display: none; }
.pg-radio b{ font-size: 12.5px; font-weight: 600; }
.pg-radio i{ font-style: normal; font-size: 11px; color: var(--muted); }
.pg-radio.on{ border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(47,107,255,.08); }

@media (max-width: 900px){
  .pg-methods, .pg-tpl-grid{ grid-template-columns: 1fr; }
  .pg-radios{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pg-calc{ flex-direction: column; align-items: flex-start; }
  .pg-calc-r{ margin-left: 0; width: 100%; }
  .pg-paper{ padding: 20px 18px; }
  .pg-paper p{ font-size: 12.5px; line-height: 1.9; }
}

/* ---------- 合并页签内的分段（制度与模版） ---------- */
.pg-sec{ margin-bottom: 26px; }
.pg-sec:last-child{ margin-bottom: 0; }
.pg-sec-hd{
  font-size: 13px; font-weight: 600; color: var(--text);
  padding-left: 10px; margin-bottom: 12px; position: relative;
}
.pg-sec-hd::before{
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px;
  border-radius: 2px; background: var(--primary);
}
/* 合并后的页签里嵌两组卡片时，去掉多余的上间距 */
.card-bd > .card + .card{ margin-top: 16px; }

/* ---- 采购制度参数（可自定义限额 / 比价要求） ---- */
.pg-cfg {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 18px;
}
.pg-cfg-hd { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.pg-cfg-hd > div { flex: 1; min-width: 0; }
.pg-cfg-hd b { font-size: 14px; }
.pg-cfg-hd p { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.pg-cfg-form .form-3col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.pg-cfg-form .field { margin-bottom: 12px; }
.pg-cfg-ft {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
}
@media (max-width: 900px) {
  .pg-cfg-form .form-3col { grid-template-columns: 1fr; }
}

/* ---- 采购台账：行内来源角标 + 比价格式化 ---- */
.pg-sub {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted); margin-top: 4px;
}
.pg-sub .tag { transform: scale(.94); transform-origin: left center; }
.pg-mute { font-size: 12px; color: var(--muted); }

/* ---- 询价比价工作台 ---- */
.pg-q { padding: 15px 16px; box-shadow: none; border: 1px solid var(--line); }
.pg-q + .pg-q { margin-top: 12px; }
.pg-q-hd { display: flex; align-items: flex-start; gap: 12px; }
.pg-q-hd b { font-size: 14px; }
.pg-q-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 10px; margin-top: 12px;
}
.pg-q-card {
  position: relative; padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff;
}
.pg-q-card.low { border-color: #BFE3CD; background: #F6FBF8; }
.pg-q-card.on { border-color: #9EC1FF; background: #F5F9FF; box-shadow: 0 1px 4px rgba(37,99,235,.09); }
.pg-q-b { position: absolute; top: 8px; right: 9px; transform: scale(.9); transform-origin: right top; }
.pg-q-n { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.pg-q-p { font-size: 15.5px; font-weight: 600; margin: 3px 0 2px; color: var(--ink); }

/* 拟邀供应商：名称 / 联系人 / 电话 一行三个控件 */
.apx-row-sup { grid-template-columns: minmax(0, 1.7fr) minmax(0, .85fr) minmax(0, 1fr) 30px; }
.apx-row-sup .icon-btn { height: 30px; }
@media (max-width: 620px) {
  .apx-row-sup { grid-template-columns: 1fr; }
  .apx-row-sup .icon-btn { justify-self: end; }
}

/* ---- 节点资料核实（完成节点前必须核实） ---- */
.pg-alert{
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 12px; padding: 9px 13px; border-radius: 10px;
  background: #FFF8EC; border: 1px solid #F3DBB0; color: #8A5B12;
  font-size: 12.5px; line-height: 1.7;
}
.pg-alert b{ color: #B45309; }
.pv-req{
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 6px; font-size: 11.5px;
}
.pv-req > span{ color: var(--muted); }
.pv-req em{
  font-style: normal; padding: 2px 8px; border-radius: 7px;
  background: #F4F6FA; color: #4B5B72; border: 1px solid var(--line);
}
.pg-ver{ margin-top: 6px; font-size: 11.5px; color: var(--green); }
.pg-doc i.lock{ color: #B0BBCB; cursor: default; }

.pv .pg-rulebox{ margin-bottom: 4px; }
.pv-list{ display: grid; gap: 8px; }
.pv-item{
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; cursor: pointer; transition: border-color .15s, background .15s;
}
.pv-item:hover{ border-color: var(--primary); }
.pv-item:has(input:checked){ border-color: #9EC1FF; background: #F5F9FF; }
.pv-item input{ margin-top: 2px; width: 15px; height: 15px; accent-color: var(--primary); flex: none; }
.pv-item span{ display: flex; flex-direction: column; gap: 2px; }
.pv-item b{ font-size: 13px; font-weight: 600; }
.pv-item em{ font-style: normal; font-size: 11.5px; color: var(--muted); }
.pv-docs{ display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; align-items: center; }
.pv-empty{
  font-size: 12px; color: var(--muted); padding: 9px 12px;
  border: 1px dashed var(--line); border-radius: 10px; width: 100%;
}
.pv-foot-note{
  display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line); font-size: 12px; color: var(--muted);
}
.pv-foot-note b{ color: var(--ink); font-weight: 600; }
.btn[disabled]{ opacity: .5; cursor: not-allowed; }

/* ---- 节点资料要求一览表 ---- */
.pg-req-note{
  font-size: 12px; color: var(--muted); line-height: 1.75;
  padding: 9px 12px; border-radius: 10px; background: #F7F9FC; border: 1px solid var(--line);
  margin-bottom: 12px;
}
.pg-req-note b{ color: var(--ink); }
.pg-req-table td{ vertical-align: top; font-size: 12.5px; }
.pg-req-items em{
  font-style: normal; display: inline-block; margin: 0 8px 4px 0;
  padding: 1px 7px; border-radius: 6px; background: #F4F6FA; color: #4B5B72; font-size: 11.5px;
}
