/* 中间商后台 - 商务蓝风格 */
:root {
  --primary: #1a5fd0;
  --primary-dark: #14489f;
  --bg: #f4f6fa;
  --line: #e3e8f0;
  --text: #1d2433;
  --muted: #7b8698;
  --green: #0f9d58;
  --orange: #e8890c;
  --red: #d9363e;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 208px; background: #101a2b; color: #c9d2e0; padding: 0 0 24px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 18px 18px 14px; font-size: 15px; color: #fff; font-weight: 700; letter-spacing: .5px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand small { display: block; font-weight: 400; font-size: 12px; color: #7d8ba3; margin-top: 4px; }
.nav-group { padding: 10px 0 2px; }
.nav-group h4 { margin: 0; padding: 6px 18px; font-size: 12px; color: #6b7891; font-weight: 500; letter-spacing: 1px; }
.nav-item { display: block; padding: 9px 18px; color: #c9d2e0; font-size: 13.5px; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { background: rgba(26,95,208,.22); border-left-color: #4a86ee; color: #fff; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 20; }
.topbar .title { font-size: 16px; font-weight: 600; }
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.topbar .right a { color: var(--muted); }
.content { padding: 18px 20px 32px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filter .fi { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.filter input, .filter select { height: 32px; min-width: 130px; }
input, select, textarea { border: 1px solid #d7dee9; border-radius: 6px; padding: 6px 9px; font-size: 13px; font-family: inherit; color: var(--text); background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(26,95,208,.12); }
textarea { width: 100%; min-height: 68px; resize: vertical; }
.btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #d7dee9; background: #fff; color: var(--text); border-radius: 6px; padding: 6px 13px; font-size: 13px; cursor: pointer; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn.danger { color: var(--red); border-color: #f0c8c9; }
.btn.ghost { border-color: transparent; color: var(--primary); background: transparent; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 9px 10px; border-bottom: 1px solid #edf1f7; font-size: 13px; text-align: left; vertical-align: middle; }
th { background: #f8fafd; color: #4c586d; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #fbfcff; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; background: #eef2f9; color: #4c586d; }
.badge.blue { background: #e8f0fe; color: #1a5fd0; }
.badge.green { background: #e5f6ec; color: #0f9d58; }
.badge.orange { background: #fdf1e0; color: #b56a05; }
.badge.red { background: #fdeaea; color: #c62b32; }
.badge.gray { background: #f1f3f7; color: #7b8698; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 24px; font-weight: 700; margin-top: 6px; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.stat .v.small { font-size: 18px; }
.stat.warn .v { color: var(--orange); }
.stat.danger .v { color: var(--red); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tab { padding: 8px 14px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding-top: 12px; font-size: 12px; color: var(--muted); }
.pager button { min-width: 30px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.kv { display: grid; grid-template-columns: 118px 1fr; gap: 8px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--text); word-break: break-all; }
.mask { position: fixed; inset: 0; background: rgba(16,26,43,.45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.mask.on { display: flex; }
.dialog { background: #fff; border-radius: 10px; width: 720px; max-width: 96vw; max-height: 92vh; overflow: auto; padding: 18px 20px; }
.dialog h3 { margin: 0 0 14px; font-size: 16px; }
.dialog .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.dialog.wide { width: 1000px; }
.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: #1d2433; color: #fff; padding: 9px 18px; border-radius: 6px; font-size: 13px; z-index: 999; opacity: 0; transition: .2s; pointer-events: none; }
.toast.on { opacity: 1; }
.toast.err { background: #b9272e; }
.empty { padding: 30px; text-align: center; color: #9aa4b5; font-size: 13px; }
.up-cell { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { width: 92px; height: 92px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); }
.doc-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.bar { height: 8px; background: #eef2f9; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg,#4a86ee,#1a5fd0); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.7; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-form .full { grid-column: 1/-1; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }
.form-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.item-table input { height: 30px; padding: 4px 7px; }
.section-title { font-size: 13px; font-weight: 600; margin: 16px 0 8px; color: #33405a; }
@media (max-width: 980px) {
  .sidebar { display: none; }
  .grid2, .form-row { grid-template-columns: 1fr; }
}

/* 采购流程步骤条 */
.flow { display: flex; margin: 16px 0 4px; flex-wrap: wrap; }
.flow-step { flex: 1; min-width: 118px; position: relative; text-align: center; padding: 0 6px; }
.flow-step:not(:first-child)::before { content: ''; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: #e5e9f2; z-index: 0; }
.flow-step.done:not(:first-child)::before { background: #16a34a; }
.flow-dot { position: relative; z-index: 1; width: 34px; height: 34px; line-height: 34px; margin: 0 auto 6px; border-radius: 50%; background: #eef2f9; color: #95a0b5; font-size: 15px; font-weight: 700; }
.flow-step.done .flow-dot { background: #16a34a; color: #fff; }
.flow-step.active .flow-dot { background: #f59e0b; color: #fff; box-shadow: 0 0 0 4px rgba(245,158,11,.16); }
.flow-name { font-size: 13px; font-weight: 600; color: #33405a; }
.flow-step.active .flow-name { color: #b45309; }
.flow-sub { font-size: 11px; color: #95a0b5; margin-top: 2px; }
.flow-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 4px; }
