:root {
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-soft: #eef3ff;
  --ink: #171a1f;
  --ink-2: #464c55;
  --muted: #8b929c;
  --line: #e6e9ed;
  --line-2: #f0f2f5;
  --card: #f6f7f9;
  --danger: #b4232b;
  --danger-soft: #fbeced;
  --warn: #97660f;
  --warn-soft: #fbf4e4;
  --ok: #1c6642;
  --ok-soft: #e8f1ec;
  --r: 8px;
  --r-sm: 6px;
  --shadow: 0 1px 2px rgba(20, 24, 30, .04);
  --shadow-lg: 0 4px 16px rgba(20, 24, 30, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.65; }

.app { display: flex; height: 100vh; overflow: hidden; }

/* 第一栏：平台 */
.rail {
  width: 86px; flex: none; background: #f4f6f8;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0 0;
}
.rail-brand {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; letter-spacing: .5px;
  margin-bottom: 22px;
}
.rail-item {
  width: 72px; padding: 8px 0 9px; margin-bottom: 6px;
  border: 0; border-radius: var(--r); background: transparent;
  color: var(--ink-2); font-family: inherit; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: background .15s, color .15s;
}
.rail-item:hover { background: #e9edf2; }
.rail-item.active { background: #fff; color: var(--blue); box-shadow: var(--shadow); font-weight: 600; }
.rail-ico {
  width: 34px; height: 34px; border-radius: 9px;
  background: #e7ebf0; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; line-height: 1;
}
.rail-item.active .rail-ico { background: var(--blue); color: #fff; }
.rail-txt { line-height: 1.25; white-space: nowrap; }

/* 第二栏：账号 */
.account-panel {
  width: 168px; flex: none; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: #fbfcfd; overflow: hidden;
}
.ap-head { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 16px 14px 8px; }
.ap-head h2 { margin: 0; font-size: 16px; font-weight: 650; min-width: 0; white-space: nowrap; }
.ap-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.ap-head-actions .ap-add-text { flex: 1; text-align: center; }
.ap-add {
  width: 28px; height: 28px; border: 1px solid var(--blue); background: #fff; color: var(--blue);
  border-radius: var(--r-sm); font-size: 17px; line-height: 1; cursor: pointer; font-family: inherit; flex: none;
}
.ap-add:hover { background: var(--blue); color: #fff; }
.ap-add-text {
  margin: 0; padding: 6px 8px; border: 1px dashed #bcc8d8; background: #fff; color: var(--blue);
  border-radius: var(--r-sm); font-size: 13px; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.ap-add-text:hover { border-color: var(--blue); background: #f6f9ff; }
.ap-hint { padding: 0 16px 10px; font-size: 13px; color: var(--muted); }
.ap-list { flex: 1; overflow-y: auto; padding: 0 10px 18px; }
.ap-list::-webkit-scrollbar { width: 6px; }
.ap-list::-webkit-scrollbar-thumb { background: #d9dde2; border-radius: 3px; }
.ap-item {
  border: 1px solid transparent; border-radius: var(--r); padding: 11px 11px;
  margin-bottom: 7px; cursor: pointer; position: relative; transition: background .15s, border-color .15s;
}
.ap-item:hover { background: #f0f2f5; }
.ap-item.active { background: #fff; border-color: var(--blue); box-shadow: var(--shadow); }
.ap-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.ap-dot { width: 7px; height: 7px; border-radius: 50%; background: #c6ccd4; flex: none; }
.ap-item.active .ap-dot { background: var(--blue); }
.ap-meta {
  font-size: 12.5px; color: var(--muted); margin-top: 4px; padding-left: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ap-ops { display: none; gap: 8px; margin-top: 7px; padding-left: 14px; }
.ap-item:hover .ap-ops, .ap-item.active .ap-ops { display: flex; }
.ap-op { border: 0; background: transparent; color: var(--blue); font-size: 12.5px; font-family: inherit; cursor: pointer; padding: 0; }
.ap-op.del { color: var(--danger); }
.ap-op:hover { text-decoration: underline; }
.ap-empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 30px 10px; line-height: 1.85; }

/* 第三栏：写作 */
.work-area { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.work-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.we-mark {
  width: 60px; height: 60px; border-radius: 15px; background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; margin-bottom: 18px;
}
.work-empty p { margin: 3px 0; font-size: 15px; }
.work-empty .we-sub { font-size: 13.5px; color: #a5abb4; }

.work-view { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.work-bar {
  flex: none; min-height: 56px; display: flex; align-items: center; gap: 14px;
  padding: 8px 22px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.work-account {
  font-weight: 650; font-size: 15px; color: var(--blue); background: var(--blue-soft);
  border: 1px solid #dbe6ff; padding: 5px 12px; border-radius: var(--r-sm); white-space: nowrap;
}
.work-account.flash { animation: acctFlash .6s ease; }
@keyframes acctFlash { 0% { background: #cfe0ff; transform: scale(1.05); } 100% { background: var(--blue-soft); transform: scale(1); } }
.flex1 { flex: 1; }
.model-chip {
  border: 1px solid var(--line); background: #fff; color: var(--blue); border-radius: var(--r-sm);
  padding: 5px 11px; font-size: 13px; font-family: inherit; cursor: pointer;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.model-chip:hover { border-color: var(--blue); }
.link-btn { border: 0; background: transparent; color: var(--blue); font-size: 14px; cursor: pointer; font-family: inherit; padding: 3px 5px; }
.link-btn:hover { text-decoration: underline; }
.api-state { font-size: 13px; color: var(--warn); }
.api-state.ok { color: var(--ok); }
.work-body { flex: 1; display: flex; min-height: 0; overflow: hidden; }

/* 中间配置栏：大纲 + 成稿并列 */
.config {
  width: 660px; flex: none; min-width: 0; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; background: #fff;
}
.config-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: #fafbfc; flex: none;
}
.top-note { font-size: 13px; color: var(--muted); }
.config-scroll { flex: 1; min-height: 0; display: flex; gap: 18px; overflow: hidden; padding: 16px 20px 20px; }
.config-scroll::-webkit-scrollbar { width: 8px; }
.config-scroll::-webkit-scrollbar-thumb { background: #d9dde2; border-radius: 4px; }
.pane-col { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; padding-right: 6px; }
.pane-col::-webkit-scrollbar { width: 8px; }
.pane-col::-webkit-scrollbar-thumb { background: #d9dde2; border-radius: 4px; }
.pane-head {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px;
  padding-bottom: 11px; border-bottom: 2px solid var(--blue);
}
.pane-head b { font-size: 18px; font-weight: 700; color: var(--ink); }
.pane-head small { font-size: 12.5px; color: var(--muted); }
.pane-head.focus b { color: var(--blue); }
.pane-head.focus::after {
  content: '当前'; margin-left: auto; font-size: 12px; color: var(--blue);
  background: var(--blue-soft); padding: 2px 8px; border-radius: 4px; align-self: center;
}
.step-pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cfg-card { background: var(--card); border-radius: var(--r); padding: 15px; margin-bottom: 12px; }
.cfg-card h3 { margin: 0 0 12px; font-size: 14.5px; font-weight: 650; color: var(--ink); }
.cfg-card h3 small { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.cfg-card select { width: 100%; }
.cfg-card.action-card { padding: 11px; }
.src-input.short { min-height: 76px; }

/* 账号栏底部：数据导入导出 */
.ap-data-tools {
  display: flex; gap: 10px; padding: 8px 14px 10px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.ap-link-btn {
  flex: 1; border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: var(--r-sm); padding: 6px 4px; font-size: 12px;
  font-family: inherit; cursor: pointer; transition: border-color .15s, color .15s;
}
.ap-link-btn:hover { border-color: var(--blue); color: var(--blue); }

/* 可点击条目 */
.field-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; flex: 1; }
.field-item {
  position: relative; background: var(--card); border: 1px solid transparent; border-radius: var(--r);
  padding: 14px 36px 15px 14px; cursor: pointer;
  transition: border-color .15s, background .15s; display: flex; flex-direction: column; justify-content: center;
}
.field-item:hover { border-color: var(--blue); background: #f4f7ff; }

/* 第三板块：素材灵感 / 生成大纲要求 / 新的大纲 —— 三个条目放大 */
#paneOutline .field-list { gap: 12px; flex: none; margin-bottom: 14px; }
#paneOutline .field-item { padding: 16px 38px 17px 18px; min-height: 86px; justify-content: flex-start; }
#paneOutline .fi-label { font-size: 15.5px; gap: 8px; }
#paneOutline .fi-mode { font-size: 12.5px; padding: 2px 8px; }
#paneOutline .fi-box { margin-top: 10px; padding: 8px 6px 8px 12px; gap: 8px; }
#paneOutline .fi-box-text {
  font-size: 14px; line-height: 1.65; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
#paneOutline .fib-btn { padding: 4px 11px; font-size: 12.5px; }
#paneOutline .mini-btn.wide { padding: 13px; font-size: 15px; }

/* 第三板块：自查报告紧跟提取按钮，按内容完整展开，超出由本栏滚动 */
#paneOutline > .cfg-card { flex: none; margin-bottom: 0; }
#paneOutline > .cfg-card .mini-actions { position: sticky; bottom: 0; background: var(--card); padding-top: 10px; }
.fi-label { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 650; color: var(--ink); }
.fi-mode { font-size: 12px; font-weight: 400; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 1px 7px; }
.fi-value { font-size: 13px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-box {
  display: flex; align-items: center; gap: 6px; margin-top: 7px;
  padding: 4px 5px 4px 9px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
}
.fi-box-text { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-box-text.filled { color: var(--ink-2); }
.fib-btn {
  flex: none; border: 1px solid var(--line); background: #f7f8fa; color: #5c6672;
  border-radius: 5px; padding: 3px 8px; font-size: 12px; line-height: 1.5;
  font-family: inherit; cursor: pointer; transition: border-color .15s, color .15s;
}
.fib-btn:hover { border-color: var(--blue); color: var(--blue); }
.fi-arrow { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: #bcc2ca; font-size: 20px; line-height: 1; }
.field-item:hover .fi-arrow { color: var(--blue); }
.field-item.no-edit { cursor: default; }
.field-item.no-edit:hover { border-color: transparent; background: var(--card); }
.field-item.no-edit .fi-arrow { display: none; }
.field-item.no-edit .readonly-tags { margin-top: 7px; }
.mini-btn.wide { width: 100%; padding: 11px; margin-top: 4px; font-size: 14.5px; }
.step-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.step-tab {
  flex: 1; padding: 10px 6px; border: 1px solid var(--line); background: #f7f8fa;
  color: var(--muted); border-radius: var(--r-sm); font-size: 14px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.step-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.mini-btn.primary { background: var(--blue); color: #fff; }
.mini-btn.primary:hover { background: var(--blue-hover); color: #fff; }
.mini-btn:disabled { opacity: .5; cursor: not-allowed; }
.mini-actions.dual { gap: 10px; }
.mini-actions.dual .mini-btn { flex: 1; }

.outline-report { font-size: 13.5px; line-height: 1.7; }
.outline-report .ov { border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 10px; font-size: 13.5px; font-weight: 600; }
.outline-report .ov.ok { background: var(--ok-soft); color: #177245; }
.outline-report .ov.warn { background: var(--warn-soft); color: #96631a; }
.outline-report .ov.block { background: var(--danger-soft); color: #b3261e; }
.outline-report .oi { border-top: 1px solid var(--line); padding: 8px 0; }
.outline-report .oi b { color: var(--ink); }
.outline-report .oi .badge { float: right; font-size: 12px; padding: 1px 7px; border-radius: 4px; }
.outline-report .oi .badge.ok { background: var(--ok-soft); color: #177245; }
.outline-report .oi .badge.warn { background: var(--warn-soft); color: #96631a; }
.outline-report .oi .badge.block { background: var(--danger-soft); color: #b3261e; }
.outline-report .oi p { margin: 4px 0 0; color: var(--ink-2); }

/* 第三板块：自查报告卡片放大 */
#paneOutline .cfg-card { padding: 18px; margin-bottom: 10px; }
#paneOutline .cfg-card h3 { font-size: 15.5px; margin-bottom: 14px; }
#paneOutline .cfg-card h3 small { font-size: 13px; }
#paneOutline .outline-report { font-size: 14.5px; line-height: 1.8; }
#paneOutline .outline-report .ov { font-size: 14.5px; padding: 12px 14px; margin-bottom: 12px; }
#paneOutline .outline-report .oi { padding: 11px 0; }
#paneOutline .outline-report .oi b { font-size: 14.5px; }
#paneOutline .outline-report .oi .badge { font-size: 12.5px; padding: 2px 9px; }
#paneOutline .outline-report .oi p { font-size: 14px; line-height: 1.75; margin-top: 6px; }
#paneOutline .mini-actions.dual .mini-btn { padding: 9px 14px; font-size: 14px; }
.readonly-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ro-tag { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; font-size: 12.5px; color: var(--ink-2); }

.seg { display: flex; gap: 8px; }
.seg-btn {
  flex: 1; padding: 9px 6px; border: 1px solid #dbe0e6; background: #fff; color: var(--ink-2);
  border-radius: var(--r-sm); font-size: 13px; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.seg-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.seg-btn:not(.active):hover { border-color: var(--blue); color: var(--blue); }

.src-input {
  width: 100%; min-height: 108px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; padding: 11px 12px; font-family: inherit; font-size: 16px;
  line-height: 1.8; color: var(--ink); resize: vertical; outline: none;
}
.src-input:focus { border-color: var(--blue); }
.src-input::placeholder { color: #b3b8c0; }
.src-input.outline { min-height: 92px; margin-top: 9px; background: #fcfcfd; }
.mini-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.mini-btn {
  border: 1px solid var(--blue); background: #fff; color: var(--blue);
  border-radius: var(--r-sm); padding: 5px 12px; font-size: 13px; font-family: inherit; cursor: pointer;
}
.mini-btn:hover { background: var(--blue); color: #fff; }
.muted { color: var(--muted); font-size: 12.5px; }

.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; }
.check-grid label, .radio { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check-grid input, .radio input { accent-color: var(--blue); margin: 0; width: 15px; height: 15px; }
.radio + .radio { margin-top: 8px; }

.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--blue); min-width: 0; }
.numbox { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: #fff; flex: none; }
.nb-btn { width: 28px; height: 30px; border: 0; background: #fafbfc; color: var(--ink-2); font-size: 15px; cursor: pointer; }
.nb-btn:hover { background: var(--line-2); }
.numbox input {
  width: 50px; height: 30px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  text-align: center; font-size: 13.5px; font-family: inherit; outline: none; -moz-appearance: textfield;
}
.numbox input::-webkit-outer-spin-button, .numbox input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

select, input[type="text"], input[type="password"], input[type="number"] {
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
  padding: 9px 11px; font-family: inherit; font-size: 14px; color: var(--ink); outline: none;
}
select:focus, input:focus { border-color: var(--blue); }

.config-foot { flex: none; border-top: 1px solid var(--line); padding: 12px 16px 14px; background: #fff; }
.big-btn {
  width: 100%; background: var(--blue); color: #fff; border: 0; border-radius: var(--r);
  padding: 12px; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.big-btn:hover { background: var(--blue-hover); }
.big-btn:disabled { opacity: .6; cursor: not-allowed; }
.foot-note { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 8px; }

/* 右侧结果 */
.result { flex: 1; min-width: 0; overflow-y: auto; padding: 22px 22px 34px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.result-head h2 { font-size: 18px; margin: 0; font-weight: 700; }
.rh-ops { display: flex; align-items: center; gap: 12px; }
.rh-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.rh-check input { accent-color: var(--blue); width: 15px; height: 15px; }
.rh-sel { font-size: 13px; color: var(--muted); white-space: nowrap; }
.batch-btn {
  border: 0; background: var(--blue); color: #fff; border-radius: var(--r-sm);
  padding: 8px 16px; font-size: 13px; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.batch-btn:hover { filter: brightness(1.06); }
.platform-tag { font-size: 12.5px; font-weight: 400; color: var(--blue); background: var(--blue-soft); padding: 2px 8px; border-radius: 4px; margin-right: 5px; }
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: #f6f8fa; border-radius: var(--r); padding: 11px 15px; margin-bottom: 14px;
}
.hide-toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.switch { position: relative; display: inline-block; width: 34px; height: 19px; background: #c8cdd4; border-radius: 10px; transition: background .18s; }
.switch i { position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.switch.on { background: var(--blue); }
.switch.on i { transform: translateX(15px); }
.switch-state { font-size: 13px; color: var(--muted); }
.list-count { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.list-count b { font-weight: 600; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
.result-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 700px; table-layout: fixed; }
.result-table th { background: #fafbfc; color: var(--ink-2); font-weight: 600; font-size: 13px; text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; line-height: 1.5; }
.result-table th small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; letter-spacing: .2px; }
.result-table td { padding: 14px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.result-table tr:last-child td { border-bottom: 0; }
.result-table tbody tr:hover { background: #fbfcfd; }
.c-check { width: 48px; text-align: center !important; }
.c-title { width: auto; min-width: 190px; }
.c-status { width: 104px; }
.c-lim { width: 88px; }
.c-audit { width: 250px; }
.c-op { width: 92px; }
.result-table input[type="checkbox"] { accent-color: var(--blue); width: 15px; height: 15px; }
.title-cell { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plat-mini {
  font-size: 11.5px; color: var(--blue); background: var(--blue-soft);
  padding: 2px 7px; border-radius: 4px; margin-right: 7px; display: inline-block; vertical-align: 1px;
}
.op-group { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.op-group .op-btn { padding: 2px 0; font-size: 13px; }
.op-sep { color: #d8dce1; margin: 0 4px; }
.tag-ok { color: var(--ok); background: var(--ok-soft); padding: 4px 10px; border-radius: 4px; font-size: 12.5px; white-space: nowrap; }
.tag-fail { color: var(--danger); background: var(--danger-soft); padding: 4px 10px; border-radius: 4px; font-size: 12.5px; white-space: nowrap; }
.tag-run { color: var(--muted); font-size: 12.5px; }
.audit-ok { border: 0; background: transparent; color: var(--ok); font-size: 13.5px; cursor: pointer; font-family: inherit; padding: 0; }
.audit-ok:hover { text-decoration: underline; }
.sim-badge {
  display: inline-block; margin-left: 8px; font-size: 12.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 4px; white-space: nowrap; vertical-align: 1px;
}
.sim-badge.fine { background: var(--ok-soft); color: #177245; }
.sim-badge.over { background: var(--danger-soft); color: #b3261e; }
.c-lim .sim-badge { margin-left: 0; }
.na-dash { color: var(--muted); }
.result-table th.grp {
  text-align: center; background: #f2f5f9; color: var(--ink-2); letter-spacing: .3px;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.result-table th.grp-sub {
  font-size: 11px; font-weight: 500; color: var(--muted); text-align: center;
  white-space: nowrap; line-height: 1.3; letter-spacing: -.2px;
  padding: 8px 4px; border-left: 1px solid var(--line);
}
.result-table th.grp-sub:last-child { border-right: 1px solid var(--line); }
/* 操作列固定在表格最右侧，横向滚动时不跑掉 */
.result-table th.c-op, .result-table td.c-op {
  position: sticky; right: 0; z-index: 2; background: #fff;
  box-shadow: -8px 0 10px -8px rgba(20, 24, 30, .18);
}
.result-table th.c-op { background: #fafbfc; }
.result-table tbody tr:hover td.c-op { background: #fbfcfd; }
.op-btn { border: 0; background: transparent; color: var(--blue); font-size: 13.5px; cursor: pointer; font-family: inherit; padding: 3px; white-space: nowrap; }
.op-btn:hover { text-decoration: underline; }
.op-btn.del { color: var(--danger); }
.op-sep { color: #d8dce1; margin: 0 4px; }
.empty-row td { text-align: center; color: var(--muted); padding: 46px 12px; }

.detail-box { margin-top: 18px; }
.report-card { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; background: #fff; }
.report-card h3 { margin: 0 0 14px; font-size: 15px; }
.verdict { padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.verdict.block { background: var(--danger-soft); color: var(--danger); }
.verdict.warn { background: var(--warn-soft); color: var(--warn); }
.verdict.ok { background: var(--ok-soft); color: var(--ok); }
.issue { border-left: 3px solid var(--line); padding: 3px 0 3px 12px; margin-bottom: 14px; }
.issue.block { border-color: var(--danger); }
.issue.warn { border-color: var(--warn); }
.issue.ok { border-color: var(--ok); }
.issue-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.issue-head b { font-size: 14px; }
.badge { font-size: 12px; padding: 2px 7px; border-radius: 4px; }
.badge.block { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.issue p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); }
.issue .spot { background: #f7f8fa; border-radius: var(--r-sm); padding: 8px 10px; margin-top: 7px; font-size: 13px; color: var(--ink-2); }
.draft-text {
  white-space: pre-wrap; line-height: 1.95; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 15px; margin-bottom: 14px;
  max-height: 340px; overflow-y: auto;
}
.disclaimer { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.disclaimer p { margin: 4px 0; }

/* 弹窗 */
.modal {
  display: none; position: fixed; inset: 0; background: rgba(20,24,30,.42); z-index: 50;
  align-items: center; justify-content: center; padding: 24px;
}
.modal.open { display: flex; }
.modal-inner { background: #fff; border-radius: 12px; width: 700px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-inner.small { width: 500px; }
.modal-inner.wide { width: 880px; }
.modal-head-ops { display: flex; align-items: center; gap: 16px; }
.modal-body .draft-text { max-height: 44vh; }
.sec-title { margin: 16px 0 12px; font-size: 15px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-head h2 small { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 9px; }
.modal-body { padding: 22px 24px 20px; overflow-y: auto; }
.field-block .seg { margin-bottom: 12px; }
.edit-area { min-height: 300px; font-size: 16px; line-height: 1.85; }
.edit-area.short { min-height: 150px; }
.edit-area.outline { min-height: 300px; }
.pick-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pick {
  padding: 10px 18px; border: 1px solid #dbe0e6; background: #fff; color: var(--ink-2);
  border-radius: var(--r-sm); font-size: 14.5px; font-family: inherit; cursor: pointer;
}
.pick:hover { border-color: var(--blue); color: var(--blue); }
.pick.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 面板内紧凑点选 */
.inline-card { padding: 14px 15px; }
.inline-card h3 { margin-bottom: 10px; }
.pick-list.compact { gap: 7px; }
.pick-list.compact .pick { padding: 7px 12px; font-size: 13.5px; border-radius: var(--r-sm); }
.inline-card .slider-row { gap: 10px; }

/* 下拉选择框 */
.select-shell { position: relative; }
.pick-select {
  width: 100%; appearance: none; -webkit-appearance: none; padding: 12px 38px 12px 14px;
  border: 1px solid #dbe0e6; background: #fff; color: var(--ink-2); border-radius: var(--r-sm);
  font-size: 14.5px; font-family: inherit; cursor: pointer; line-height: 1.35;
}
.pick-select:hover { border-color: var(--blue); }
.pick-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.pick-select:invalid, .pick-select:empty { color: var(--muted); }
.select-shell::after {
  content: ''; position: absolute; right: 15px; top: 50%; width: 8px; height: 8px;
  border-right: 1.8px solid #9aa5b1; border-bottom: 1.8px solid #9aa5b1;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.field-hint { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.field-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 24px; border-top: 1px solid var(--line); background: #fafbfc; border-radius: 0 0 12px 12px; }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.cfg-grid .wide { grid-column: 1 / -1; }
.cfg-grid label, .form-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.hint { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; line-height: 1.75; }
.modal-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.modal-actions .primary { margin-left: auto; }
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink-2); padding: 9px 16px; border-radius: var(--r-sm); font-size: 14.5px; font-family: inherit; cursor: pointer; }
.btn:hover { border-color: #c8cdd4; background: #fafbfc; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.danger { color: var(--danger); border-color: #f0c9c5; }
.btn.danger:hover { background: var(--danger-soft); border-color: #e7b4ae; }
.field-foot .muted { margin-right: auto; }
.cfg-sub { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.cfg-sub-head { font-size: 14.5px; font-weight: 600; margin-bottom: 12px; }
.cfg-sub-head .muted { font-weight: 400; margin-left: 7px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid3 label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--ink-2); }
.editor.small {
  min-height: 140px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px;
  font-family: inherit; font-size: 16px; line-height: 1.75; resize: vertical; outline: none; color: var(--ink);
}
.editor.small:focus { border-color: var(--blue); }
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: var(--r-sm);
  font-size: 15px; opacity: 0; pointer-events: none; transition: .2s; z-index: 80;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1440px) {
  .config { width: 640px; }
  .config-scroll { gap: 14px; padding: 14px 16px 18px; }
  .result { padding: 20px 16px 30px; }
  .c-audit { width: 220px; }
  .c-op { width: 84px; }
  .result-table { min-width: 540px; }
}
/* 窄屏：结果表格转卡片，避免列被裁切 */
@media (max-width: 1400px) {
  .table-wrap { border: 0; overflow: visible; }
  .result-table { min-width: 0; display: block; }
  .result-table thead { display: none; }
  .result-table tbody, .result-table tr, .result-table td { display: block; width: auto; }
  .result-table tr {
    border: 1px solid var(--line); border-radius: var(--r);
    padding: 12px 14px; margin-bottom: 10px; background: #fff; position: relative;
  }
  .result-table td { padding: 3px 0; border-bottom: 0; }
  .result-table td.c-check {
    width: auto; text-align: left !important; position: absolute;
    right: 14px; top: 14px; z-index: 1;
  }
  .result-table td.c-check input { vertical-align: middle; }
  .result-table td.c-title { font-weight: 600; padding-bottom: 8px; padding-right: 30px; }
  .result-table td.c-status { width: auto; }
  .result-table td.c-audit { width: auto; padding-top: 6px; }
  .result-table td.c-op { width: auto; padding-top: 8px; border-top: 1px solid var(--line-2); margin-top: 6px; }
  .result-table th.c-op, .result-table td.c-op { position: static; box-shadow: none; background: transparent; }
  .op-group { flex-direction: row; gap: 14px; }
  .empty-row td { display: block; padding: 46px 12px; }
}
@media (max-width: 1240px) {
  .config { width: 580px; }
  .config-scroll { gap: 12px; padding: 12px 12px; }
  .account-panel { width: 152px; }
  .ap-meta { font-size: 12px; }
}
@media (max-width: 1080px) {
  .config { width: 540px; }
  .config-scroll { flex-direction: column; overflow-y: auto; }
  .pane-col { overflow: visible; }
}
@media (max-width: 860px) {
  .app { flex-direction: column; height: auto; overflow: visible; }
  .rail { width: 100%; flex-direction: row; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-brand { width: 36px; height: 36px; margin: 0 10px 0 0; font-size: 12px; }
  .rail-item { width: auto; margin: 0 6px 0 0; padding: 6px 14px; flex-direction: row; gap: 7px; }
  .rail-ico { display: none; }
  .account-panel { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); max-height: 240px; }
  .work-area { overflow: visible; }
  .work-body { flex-direction: column; }
  .config { width: 100%; border-right: 0; }
  .result { width: 100%; overflow: visible; }
}
