/* 链企风格皮肤：白底 + 浅灰侧栏 + 蓝色步骤条 */
:root {
  --lq-primary: #188df9;
  --lq-primary-2: #0f77d6;
  --lq-primary-50: #effafd;
  --lq-primary-100: #d8f1f7;
  --lq-ink: #16162a;
  --lq-ink-2: #3a3a52;
  --lq-muted: #7b8294;
  --lq-line: #e3ecf1;
  --lq-bg: #f0fbfc;
  --lq-radius: 8px;
  --lq-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

body { background: #fff; color: var(--lq-ink); }

/* 顶部导航 */
.topbar { height: 56px; padding: 0 20px; border-bottom: 1px solid var(--lq-line); background: #fff; }
.brand-name { font-size: 17px; font-weight: 700; color: #16162a; letter-spacing: 0; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: #188df9; font-size: 15px; }
.top-nav { flex: 1; display: flex; align-items: center; justify-content: center; gap: 26px; font-size: 13px; color: #3a3a52; margin: 0 24px; }
.top-nav span { white-space: nowrap; cursor: default; }
.top-msg b { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: #f53f3f; color: #fff; font-size: 10px; line-height: 15px; vertical-align: 1px; }
.top-right { gap: 12px; }
.quota-chips { gap: 8px; }
.quota-chips .chip { background: #fff7e8; border: 1px solid #ffe4ba; color: #16162a; padding: 4px 10px; }
.quota-chips .chip b { color: #d25f00; }
.recharge-btn { border: 0; border-radius: 6px; background: #ffb400; color: #3d2b00; font-size: 12px; font-weight: 600; padding: 7px 12px; cursor: pointer; }
.recharge-btn:hover { background: #ffc233; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #e6f7fc; color: #188df9; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.who { font-size: 12px; color: #7b8294; }

/* 左侧菜单 */
.app { grid-template-columns: 208px 1fr; min-height: calc(100vh - 56px); background: #fff; }
.sidebar { background: #f7f8fa; border-right: 1px solid var(--lq-line); padding: 10px 8px 8px; top: 56px; height: calc(100vh - 56px); }
.side-menu { display: flex; flex-direction: column; gap: 2px; }
.side-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 6px; color: #16162a; font-size: 13px; text-decoration: none; cursor: pointer; border: 0; background: transparent; width: 100%; text-align: left; font-family: inherit; }
.side-item:hover { background: #eef8fa; text-decoration: none; }
.side-item.active { background: #e6f7fc; color: #188df9; font-weight: 600; }
.si { width: 16px; text-align: center; font-size: 14px; color: #3a3a52; }
.side-group.open .caret { transform: rotate(180deg); }
.caret { margin-left: auto; font-size: 12px; color: #7b8294; }
.side-sub { display: none; flex-direction: column; gap: 1px; padding-left: 30px; }
.side-group.open .side-sub { display: flex; }
.side-sub a { padding: 7px 10px; border-radius: 6px; color: #3a3a52; font-size: 12.5px; cursor: pointer; }
.side-sub a:hover { background: #eef8fa; }
.side-docs { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--lq-line); }
.side-docs .side-title { margin: 2px 8px 8px; font-size: 12px; font-weight: 500; color: #7b8294; letter-spacing: 0; text-transform: none; }
.side-docs .btn { margin: 0 4px 8px; }
.doc-list { flex: 1; overflow: auto; padding: 0 2px; }
.doc-list li { padding: 8px 10px; font-size: 12.5px; color: #16162a; border-radius: 6px; }
.doc-list li:hover { background: #eef8fa; }
.doc-list li.active { background: #e6f7fc; color: #188df9; }
.doc-list .del { color: #c3d4db; }
.side-foot { border-top: 1px solid var(--lq-line); padding: 10px 8px 2px; }
.side-foot .side-title { margin: 0 0 4px; font-size: 11px; color: #7b8294; letter-spacing: 0; text-transform: none; }
.quota-box { font-size: 11px; line-height: 1.55; color: #7b8294; margin-bottom: 6px; }
.side-links { display: flex; justify-content: space-between; font-size: 11px; color: #7b8294; margin: 8px 0; }
.side-links span { cursor: pointer; }
.upgrade-btn { width: 100%; border: 1px solid #ffd08a; background: #fff7e8; color: #b25e00; border-radius: 6px; padding: 7px 0; font-size: 12px; cursor: pointer; }
.upgrade-btn:hover { background: #ffefd1; }

/* 工作区与步骤条 */
.workspace { background: #fff; padding: 0 0 84px; min-width: 0; }
.doc-head { padding: 14px 32px 2px; align-items: flex-start; }
.doc-head h1 { font-size: 16px; font-weight: 600; color: #16162a; margin: 0; }
.doc-meta { margin-top: 6px; }
.doc-meta .tag { background: #eef8fa; color: #3a3a52; border: 0; font-size: 11px; }
.stepper { display: flex; align-items: center; justify-content: center; padding: 18px 24px; border-bottom: 1px solid #eef8fa; background: #fff; position: relative; overflow-x: auto; }
.stepper .step { position: relative; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0 10px; cursor: pointer; font-family: inherit; color: #7b8294; font-size: 13px; }
.stepper .step::after { content: ""; width: 88px; height: 1px; background: #e3ecf1; margin: 0 10px 0 14px; }
.stepper .step:last-of-type::after { display: none; }
.step-no { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #c3d4db; background: #fff; color: #7b8294; display: grid; place-items: center; font-size: 12px; flex: none; }
.step.active .step-no { background: #188df9; border-color: #188df9; color: #fff; }
.step.active .step-label { color: #16162a; font-weight: 600; }
.step.done .step-no { background: #188df9; border-color: #188df9; color: #fff; }
.step.done .step-no::after { content: "✓"; }
.step.done .step-no { font-size: 0; }
.step.done .step-no::after { font-size: 12px; }
.stepper-tools { position: absolute; right: 24px; display: flex; gap: 6px; }
.stepper-tools .step-tool { border: 1px solid var(--lq-line); background: #fff; color: #3a3a52; border-radius: 6px; padding: 4px 9px; font-size: 11px; cursor: pointer; }
.stepper-tools .step-tool:hover { border-color: #86cbff; color: #188df9; }

/* 面板 */
.panel { max-width: 1160px; margin: 0 auto; padding: 24px 32px 8px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; border: 0; padding: 0; }
.panel-head h2 { font-size: 16px; font-weight: 600; color: #16162a; margin: 0 0 4px; }
.panel-head .muted, .panel-head p { font-size: 12px; color: #7b8294; margin: 0; }
.panel-head .row { gap: 8px; flex-wrap: wrap; }

/* 表单控件 */
.btn { border-radius: 6px; border-color: #d4e4ea; color: #16162a; font-size: 13px; padding: 7px 14px; box-shadow: none; }
.btn:hover { border-color: #86cbff; background: #f7feff; }
.btn.primary { background: #188df9; border-color: #188df9; color: #fff; }
.btn.primary:hover { background: #0f77d6; border-color: #0f77d6; }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn.xs { padding: 3px 8px; font-size: 11px; }
input, select, textarea { border-radius: 6px; border-color: #d4e4ea; font-size: 13px; padding: 7px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #d8f1f7; border-color: #188df9; }
.card { border-radius: 8px; box-shadow: none; border-color: var(--lq-line); }

/* 解析页卡片 */
.parse-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.parse-card { display: flex; gap: 14px; border: 1px solid var(--lq-line); border-radius: 8px; padding: 18px; background: #fff; transition: .15s; }
.parse-card:hover { border-color: #86cbff; box-shadow: 0 6px 18px rgba(37, 99, 235, .07); }
.parse-icon { width: 36px; height: 36px; flex: none; border-radius: 8px; background: #f2f5fa; color: #188df9; display: grid; place-items: center; font-size: 18px; }
.parse-body b { font-size: 14px; color: #16162a; }
.parse-body p { font-size: 12px; color: #7b8294; margin: 4px 0 8px; }
.parse-body .small { font-size: 11px; color: #9aa3b2; }

/* 链企式分区 */
.lq-section { margin-top: 26px; }
.lq-sec-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #16162a; margin-bottom: 10px; }
.lq-sec-title i { color: #f53f3f; font-style: normal; font-size: 14px; }
.lq-sec-desc { font-size: 12px; color: #7b8294; margin: -4px 0 12px; }
.lq-tip { font-size: 11px; font-weight: 400; color: #9aa3b2; margin-left: 4px; }
.lq-tip a { color: #188df9; cursor: pointer; margin-left: 4px; }
.type-tabs { display: flex; gap: 12px; flex-wrap: wrap; }
.type-tab { border: 1px solid #e3ecf1; background: #fff; border-radius: 6px; padding: 9px 18px; font-size: 13px; color: #3a3a52; cursor: pointer; font-family: inherit; }
.type-tab:hover { border-color: #86cbff; }
.type-tab.active { border-color: #188df9; background: #effafd; color: #188df9; font-weight: 600; }
.lq-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lq-upload-card { border: 1px dashed #d4e4ea; border-radius: 8px; background: #fafbfc; padding: 18px 20px; text-align: center; cursor: pointer; transition: .15s; }
.lq-upload-card:hover { border-color: #86cbff; background: #f7feff; }
.lq-up-icon { font-size: 20px; color: #188df9; margin-bottom: 6px; }
.lq-upload-card b { font-size: 13px; }
.lq-upload-card p { font-size: 11px; color: #7b8294; margin: 6px 0 0; line-height: 1.5; }
.lq-ref-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #e3ecf1; border-radius: 8px; padding: 18px; background: linear-gradient(135deg, #fbfdff, #eef4ff); cursor: pointer; }
.lq-ref-card:hover { border-color: #86cbff; }
.lq-ref-icon { width: 36px; height: 36px; flex: none; border-radius: 8px; background: #fff; color: #188df9; display: grid; place-items: center; font-size: 17px; box-shadow: 0 1px 3px rgba(37, 99, 235, .08); }
.lq-ref-card b { font-size: 13px; }
.lq-ref-card p { font-size: 11px; color: #7b8294; margin: 4px 0 0; }
.lq-img-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lq-img-card { position: relative; border: 1px solid #e3ecf1; border-radius: 8px; background: #fff; padding: 16px; cursor: pointer; transition: .15s; }
.lq-img-card:hover { border-color: #86cbff; }
.lq-img-card.active { border-color: #188df9; background: #f7feff; }
.lq-check { position: absolute; right: 12px; top: 12px; width: 16px; height: 16px; border-radius: 3px; border: 1px solid #c3d4db; background: #fff; color: transparent; display: grid; place-items: center; font-size: 11px; }
.lq-img-card.active .lq-check { background: #188df9; border-color: #188df9; color: #fff; }
.lq-img-head { font-size: 13px; font-weight: 600; color: #16162a; }
.lq-gear { color: #7b8294; font-size: 12px; }
.lq-img-card p { font-size: 11px; color: #7b8294; margin: 5px 0 10px; }
.lq-thumbs { display: flex; gap: 6px; }
.lq-thumbs i { flex: 1; height: 54px; border-radius: 4px; background: linear-gradient(135deg, #d8f1f7, #f0f4f8); }
.lq-thumbs i:nth-child(2) { background: linear-gradient(135deg, #e8f3e8, #f4f8f0); }
.lq-thumbs i:nth-child(3) { background: linear-gradient(135deg, #fde8d8, #f8f0e8); }

/* 底部操作条 */
.wizard-footer { position: sticky; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--lq-line); padding: 12px 32px; display: flex; align-items: center; justify-content: center; gap: 18px; z-index: 25; }
.wizard-footer .btn { min-width: 120px; height: 40px; border-radius: 999px; font-size: 14px; }
.wizard-footer .btn.primary { min-width: 220px; }
.wizard-hint { font-size: 12px; color: #7b8294; }

/* 其余面板沿用白底卡片 */
.stream-content { background: #f7feff; border: 1px solid #eef8fa; border-radius: 8px; }
.chapter-pane { background: #f7feff; border: 1px solid #eef8fa; border-radius: 8px; }
.tree-table { border-radius: 8px; }

@media (max-width: 1100px) {
  .top-nav { display: none; }
  .app { grid-template-columns: 180px 1fr; }
  .lq-img-sources { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .parse-choices, .lq-two { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
}

/* 布局收口：去掉横向滚动条，侧栏内部滚动 */
body { overflow-x: hidden; }
.sidebar { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.side-menu { flex: none; }
.side-docs { flex: none; max-height: 250px; }
.doc-list { max-height: 150px; }
.stepper { overflow: visible; padding: 16px 12px; }
.stepper .step { padding: 0 6px; }
.stepper .step::after { width: 44px; margin: 0 6px; }
.stepper-tools { right: 10px; }
.stepper-tools .step-tool { padding: 3px 7px; }
.wizard-footer { position: fixed; left: 208px; right: 0; bottom: 0; }
@media (max-width: 820px) { .wizard-footer { left: 0; } }
.who { max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-footer { margin: 0; animation: none; backdrop-filter: none; background: #fff; justify-content: center; }

/* 对齐链企招标解读页：标题行内描述、卡片动效 */
.panel { max-width: 1020px; }
.doc-head { max-width: 1020px; margin: 0 auto; padding: 14px 24px 2px; }
.stepper { max-width: 1020px; margin: 0 auto; border-bottom: 0; padding: 14px 0 10px; }
.lq-flow-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 2px 0 16px; }
.lq-flow-title { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.lq-flow-title h2 { margin: 0; font-size: 16px; font-weight: 600; color: #16162a; }
.lq-flow-title i { color: #f53f3f; font-style: normal; font-size: 14px; }
.lq-flow-title span { margin-left: 6px; font-size: 12px; color: #7b8294; }
.lq-section { margin-top: 22px; }
.lq-sec-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.lq-sec-title > span { font-size: 14px; font-weight: 600; color: #16162a; }
.lq-sec-title i { color: #f53f3f; font-style: normal; font-size: 13px; }
.lq-sec-title em { font-style: normal; font-weight: 400; font-size: 12px; color: #7b8294; margin-left: 6px; }
.lq-sec-title em a { color: #188df9; cursor: pointer; margin-left: 4px; }
.parse-card { min-height: 118px; padding: 20px 22px; align-items: flex-start; }
.parse-card .parse-icon { width: 34px; height: 34px; background: #fff; border: 1px solid #eef8fa; box-shadow: 0 2px 6px rgba(15,23,42,.05); }
.parse-card b { font-size: 14px; font-weight: 600; }
.parse-card .btn { background: #fff; }
.type-tab { padding: 8px 18px; font-size: 13px; border-radius: 6px; }
.type-tab.active { box-shadow: 0 0 0 2px #e6f7fc inset; }
.lq-ref-card { min-height: 92px; padding: 20px; }
.lq-img-card { padding: 16px 16px 14px; }
.lq-thumbs i { height: 48px; }
.wizard-footer { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 38%); border-top: 0; padding: 18px 0 16px; }
.wizard-footer .btn { min-width: 128px; height: 42px; }
.wizard-footer .btn.primary { min-width: 190px; }
.wizard-hint { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); background: #fff; padding: 2px 10px; border-radius: 999px; box-shadow: 0 2px 8px rgba(15,23,42,.08); }

@keyframes lqPanelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lqStepPulse { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.25); } 100% { box-shadow: 0 0 0 6px rgba(37,99,235,0); } }
.panel { animation: lqPanelIn .3s ease; }
.step-no { transition: background .2s, border-color .2s, color .2s, box-shadow .3s, transform .2s; }
.step.active .step-no { animation: lqStepPulse .6s ease; }
.parse-card, .lq-ref-card, .lq-img-card, .type-tab, .lq-upload-card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.parse-card:hover, .lq-ref-card:hover, .lq-img-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -18px rgba(37,99,235,.35); }
.type-tab:hover { transform: translateY(-1px); }
.lq-check { transition: background .2s, border-color .2s, color .2s, transform .2s; }
.lq-img-card.active .lq-check { transform: scale(1.05); }
.btn { transition: background .16s, border-color .16s, transform .16s, box-shadow .16s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.parse-card.drag-over { border-color: #188df9; background: #effafd; }

/* 上传解析进度卡片（对齐链企） */
.file-progress-card { margin-top: 14px; border: 1px solid #86cbff; border-radius: 8px; background: #fff; padding: 14px 16px 12px; animation: lqPanelIn .25s ease; }
.fpc-row { display: flex; align-items: center; gap: 10px; }
.fpc-icon { width: 30px; height: 30px; border-radius: 6px; background: #effafd; color: #188df9; display: grid; place-items: center; font-size: 15px; }
.fpc-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fpc-info b { font-size: 13px; font-weight: 600; color: #16162a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpc-info span { font-size: 11px; color: #7b8294; }
.fpc-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #188df9; background: #effafd; border-radius: 999px; padding: 3px 9px; }
.fpc-state i { width: 11px; height: 11px; border: 2px solid #bedaff; border-top-color: #188df9; border-radius: 50%; animation: fpcSpin .8s linear infinite; }
.fpc-del { border: 0; background: transparent; color: #7b8294; cursor: pointer; font-size: 14px; }
.fpc-del:hover { color: #f53f3f; }
.fpc-status { margin: 10px 0 8px; font-size: 12px; color: #7b8294; }
.fpc-bar { height: 3px; border-radius: 2px; background: #eef8fa; overflow: hidden; }
.fpc-bar i { display: block; height: 100%; width: 34%; border-radius: 2px; background: #188df9; animation: fpcSlide 1.2s ease-in-out infinite; }
.file-progress-card.done { border-color: #e3ecf1; }
.file-progress-card.done .fpc-state { color: #00b42a; background: #e8ffea; }
.file-progress-card.done .fpc-state i { display: none; }
.file-progress-card.done .fpc-bar i { width: 100%; background: #00b42a; animation: none; transform: none; }
.file-progress-card.fail { border-color: #fbaca3; }
.file-progress-card.fail .fpc-state { color: #f53f3f; background: #ffece8; }
.file-progress-card.fail .fpc-bar { display: none; }
@keyframes fpcSpin { to { transform: rotate(360deg); } }
@keyframes fpcSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }

/* 解析结果双栏编辑区（对齐链企） */
/* 解析完成后不再折叠上传区与其它区块：结果直接渲染在上传模块下方 */
.parse-result-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 6px 0 18px; }
.pr-col { position: relative; min-width: 0; }
.pr-head { font-size: 14px; font-weight: 600; color: #16162a; margin-bottom: 10px; }
.pr-head i { color: #f53f3f; font-style: normal; margin-left: 2px; }
.pr-box { height: 340px; overflow: auto; border: 1px solid #d4e4ea; border-radius: 8px; padding: 18px 20px; background: #fff; font-size: 12.5px; line-height: 1.9; outline: none; }
.pr-box:focus { border-color: #188df9; box-shadow: 0 0 0 2px #e6f7fc; }
.pr-sub { font-weight: 600; margin-bottom: 8px; color: #16162a; }
.pr-box ul { margin: 0; padding-left: 18px; }
.pr-box li { margin-bottom: 6px; }
.pr-box li b { color: #16162a; }
.pr-check { position: absolute; right: 10px; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #00b42a; color: #fff; display: grid; place-items: center; font-size: 11px; }
.pr-item { padding: 10px 0; border-bottom: 1px dashed #eef8fa; }
.pr-item:last-child { border-bottom: 0; }
.pr-item b { font-size: 13px; }
.pr-score { float: right; color: #188df9; font-size: 12px; }
.pr-item p { margin: 6px 0 0; color: #3a3a52; }
.full-report { margin-top: 10px; border-top: 1px solid #eef8fa; padding-top: 12px; }
.full-report summary { cursor: pointer; color: #188df9; font-size: 13px; margin-bottom: 10px; }
.full-report-body { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .parse-result-editor { grid-template-columns: 1fr; } }
.pr-box h3 { font-size: 14px; font-weight: 600; margin: 14px 0 8px; }
.pr-box h4 { font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.pr-box p { margin: 0 0 8px; }
.pr-box strong { font-weight: 600; }
