:root {
  --lq-primary: #0f77d6;
  --lq-primary-2: #188df9;
  --lq-primary-50: #effafd;
  --lq-primary-100: #d8f1f7;
  --lq-ink: #16162a;
  --lq-ink-2: #33334a;
  --lq-muted: #5f6474;
  --lq-line: #e1eaf0;
  --lq-bg: #f0fbfc;
  --lq-card: #ffffff;
  --lq-success: #0f766e;
  --lq-success-50: #ecfdf5;
  --lq-warn: #b45309;
  --lq-warn-50: #fffbeb;
  --lq-danger: #b91c1c;
  --lq-danger-50: #fef2f2;
  --lq-radius: 10px;
  --lq-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -18px rgba(15, 23, 42, .25);
  --lq-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--lq-ink); background: var(--lq-bg); font-size: 14px; line-height: 1.6;
}
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 19px; } h3 { font-size: 15px; } h4 { font-size: 14px; }
p { margin: 0 0 10px; }
a { color: var(--lq-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--lq-muted); }
.small { font-size: 12px; }
.good { color: var(--lq-success); }
.bad { color: var(--lq-danger); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.divider { width: 1px; height: 22px; background: var(--lq-line); margin: 0 4px; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.section-title { margin: 22px 0 10px; font-size: 15px; }

/* topbar */
.topbar {
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; background: #fff; border-bottom: 1px solid var(--lq-line); position: sticky; top: 0; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 8px; }
.logo {
  width: 28px; height: 28px; border-radius: 7px; background: var(--lq-primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.brand-name { font-weight: 750; font-size: 16px; letter-spacing: .02em; }
.brand-sub { color: var(--lq-muted); font-size: 12px; border-left: 1px solid var(--lq-line); padding-left: 8px; margin-left: 2px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.quota-chips { display: flex; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  background: var(--lq-primary-50); color: var(--lq-ink-2); font-size: 12px; border: 1px solid var(--lq-primary-100);
}
.chip b { color: var(--lq-primary); }
.who { color: var(--lq-muted); font-size: 12px; }

/* buttons */
.btn {
  appearance: none; border: 1px solid var(--lq-line); background: #fff; color: var(--lq-ink-2);
  padding: 8px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; font-family: inherit;
  transition: .15s ease; white-space: nowrap;
}
.btn:hover { border-color: #d4e4ea; background: #f0fbfc; }
.btn.primary { background: var(--lq-primary); border-color: var(--lq-primary); color: #fff; }
.btn.primary:hover { background: var(--lq-primary-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--lq-danger); border-color: #fecaca; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.xs { padding: 3px 7px; font-size: 11px; border-radius: 6px; }
.btn.block { width: 100%; display: block; }
.btn.demo { margin-top: 10px; background: var(--lq-primary-50); border-color: var(--lq-primary-100); color: var(--lq-primary); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--lq-muted); cursor: pointer; }

/* auth */
.auth-wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; max-width: 1080px; margin: 0 auto; padding: 72px 28px; align-items: center; }
.auth-art { max-width: 560px; }
.auth-kicker { color: var(--lq-primary); font-size: 13px; font-weight: 600; letter-spacing: .08em; margin-bottom: 14px; }
.auth-art h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.14; letter-spacing: -.03em; margin-bottom: 24px; }
.auth-art h1 em { font-style: normal; color: var(--lq-primary); }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--lq-ink-2); }
.auth-points li { padding-left: 22px; position: relative; }
.auth-points li:before { content: "✓"; position: absolute; left: 0; color: var(--lq-success); font-weight: 700; }
.auth-card { padding: 28px; }
.auth-card h2 { font-size: 22px; margin-bottom: 6px; }
.card {
  background: var(--lq-card); border: 1px solid var(--lq-line); border-radius: var(--lq-radius);
  box-shadow: var(--lq-shadow); padding: 18px;
}
.card.tight { padding: 12px; }
label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--lq-ink-2); }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
label.check { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
input, select, textarea {
  width: 100%; font-family: inherit; font-size: 13px; color: var(--lq-ink);
  border: 1px solid var(--lq-line); background: #fff; border-radius: 8px; padding: 8px 10px; margin-top: 5px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--lq-primary-100); border-color: var(--lq-primary); }
label.inline input, label.inline select { width: auto; margin: 0; }
label.check input { width: auto; margin: 0; }
textarea { resize: vertical; }
.msg { min-height: 18px; color: var(--lq-danger); font-size: 13px; margin: 8px 0 0; }
.msg.err { color: var(--lq-danger); }

/* app layout */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - 56px); }
.sidebar { background: #fff; border-right: 1px solid var(--lq-line); display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 56px; height: calc(100vh - 56px); }
.side-head { display: flex; flex-direction: column; gap: 8px; }
.side-title { font-size: 12px; font-weight: 700; color: var(--lq-muted); letter-spacing: .06em; text-transform: uppercase; margin: 6px 6px 8px; }
.doc-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.doc-list li {
  padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--lq-ink-2);
  display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px;
}
.doc-list li:hover { background: #f0fbfc; }
.doc-list li.active { background: var(--lq-primary-50); color: var(--lq-primary); font-weight: 600; }
.doc-list li.empty { color: var(--lq-muted); font-size: 12px; cursor: default; }
.doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.del { color: #d4e4ea; font-size: 16px; line-height: 1; padding: 0 2px; }
.del:hover { color: var(--lq-danger); }
.side-foot { border-top: 1px solid var(--lq-line); padding-top: 12px; margin-top: 8px; }
.quota-box { font-size: 12px; line-height: 1.8; }

.workspace { padding: 20px 24px 60px; max-width: 1440px; width: 100%; }
.doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.doc-head h1 { font-size: 22px; margin: 0 0 6px; }
.doc-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px;
  background: #eef8fa; color: var(--lq-ink-2); font-size: 11px; border: 1px solid var(--lq-line);
}
.stepper {
  display: flex; align-items: center; gap: 0; background: #fff; border: 1px solid var(--lq-line);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; overflow-x: auto; position: relative;
}
.step {
  border: 0; background: transparent; color: var(--lq-muted); padding: 4px 10px; cursor: pointer;
  font-size: 13px; white-space: nowrap; font-family: inherit; display: inline-flex; align-items: center;
  gap: 8px; position: relative; transition: color .2s ease, transform .2s ease;
}
.step + .step::before {
  content: ""; width: 46px; height: 1px; background: #dbe3ee; margin: 0 8px 0 0; display: inline-block;
}
.step:hover { color: var(--lq-ink-2); transform: translateY(-1px); }
.step-no {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid #d4e4ea; background: #fff; color: var(--lq-muted); font-size: 12px; font-weight: 700;
  transition: all .25s cubic-bezier(.22,.61,.36,1);
}
.step.active { color: var(--lq-primary); font-weight: 650; }
.step.active .step-no {
  background: var(--lq-primary); border-color: var(--lq-primary); color: #fff;
  box-shadow: 0 0 0 5px var(--lq-primary-50); transform: scale(1.04);
}
.step.done .step-no { background: var(--lq-success-50); border-color: #99f6e4; color: var(--lq-success); }
.step-label { font-size: 13px; }
.stepper-tools { margin-left: auto; display: flex; gap: 4px; padding-left: 12px; border-left: 1px solid var(--lq-line); }
.step-tool {
  border: 0; background: transparent; color: var(--lq-muted); font-size: 12px; cursor: pointer;
  padding: 5px 8px; border-radius: 6px; font-family: inherit;
}
.step-tool:hover { background: #f0fbfc; color: var(--lq-primary); }
.step-tool.active { background: var(--lq-primary-50); color: var(--lq-primary); font-weight: 600; }
.panel { animation: panelIn .32s cubic-bezier(.22,.61,.36,1); }
.panel.panel-anim { animation: panelIn .32s cubic-bezier(.22,.61,.36,1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px) scale(.995); } to { opacity: 1; transform: none; } }
.wizard-footer {
  position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin: 22px -24px -60px; padding: 14px 24px; background: rgba(255,255,255,.92);
  border-top: 1px solid var(--lq-line); backdrop-filter: blur(10px);
  animation: footerIn .35s ease;
}
@keyframes footerIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.wizard-hint { flex: 1; text-align: center; color: var(--lq-muted); font-size: 12px; }
.wizard-footer .btn { min-width: 112px; transition: transform .16s ease, box-shadow .16s ease; }
.wizard-footer .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(29,78,216,.55); }
.btn:active { transform: scale(.98); }
.card, .parse-card, .basis-card { transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease; }
.card:hover, .parse-card:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -22px rgba(15,23,42,.45); }
.modal-mask { animation: maskIn .2s ease; }
.modal { animation: modalIn .28s cubic-bezier(.22,.61,.36,1); }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.panel-head h2 { margin-bottom: 2px; }
.panel-head p { margin: 0; font-size: 12px; }

/* dashboard */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi-grid.four { grid-template-columns: repeat(4, 1fr); }
.kpi { background: #fff; border: 1px solid var(--lq-line); border-radius: 10px; padding: 14px 16px; }
.kpi-label { font-size: 12px; color: var(--lq-muted); }
.kpi-value { font-size: 26px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; }
.kpi-sub { font-size: 11px; color: var(--lq-muted); }
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
.dash-job { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--lq-line); font-size: 13px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--lq-line); vertical-align: top; }
.tbl th { font-size: 12px; color: var(--lq-muted); font-weight: 600; background: #f0fbfc; }
.tbl tr:hover td { background: #f7feff; }
.tbl td:last-child, .tbl th:last-child { text-align: right; }

/* tender */
.tender-input { min-height: 190px; font-size: 13px; line-height: 1.75; }
.parse-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.parse-card { display: flex; gap: 14px; padding: 20px; border: 1px solid var(--lq-line); border-radius: 12px; background: #fff; min-height: 150px; }
.parse-card:hover { border-color: var(--lq-primary-100); box-shadow: 0 6px 18px rgba(30, 64, 175, .06); }
.parse-icon { flex: 0 0 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--lq-primary-50); color: var(--lq-primary); font-size: 22px; font-weight: 700; }
.parse-body { min-width: 0; }
.parse-body b { display: block; font-size: 15px; margin-bottom: 4px; }
.parse-body p { margin: 0 0 6px; font-size: 13px; line-height: 1.65; }
@media (max-width: 760px) { .parse-choices { grid-template-columns: 1fr; } }
.hint-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--lq-line); font-size: 13px; }
.kv-row span { color: var(--lq-muted); flex: 0 0 88px; }
.kv-row b { font-weight: 600; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.basis { background: #f0fbfc; border-color: var(--lq-line); cursor: help; }
.alert { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--lq-line); background: #fff; font-size: 13px; }
.alert.warn { background: var(--lq-warn-50); border-color: #fde68a; color: #78350f; }
.alert.danger { background: var(--lq-danger-50); border-color: #fecaca; color: #7f1d1d; }
.alert.ok { background: var(--lq-success-50); border-color: #a7f3d0; color: #065f46; }
.alert.info { background: var(--lq-primary-50); border-color: var(--lq-primary-100); color: #1e3a8a; }
.req { padding: 7px 0; border-bottom: 1px dashed var(--lq-line); font-size: 13px; }
.req .tag { margin-right: 8px; }
.req.fatal .tag { background: var(--lq-danger-50); color: var(--lq-danger); border-color: #fecaca; }
.req.mandatory .tag { background: var(--lq-warn-50); color: var(--lq-warn); border-color: #fde68a; }
.interp { background: #fff; border: 1px solid var(--lq-line); border-radius: 10px; padding: 16px; }
.interp ul { margin: 6px 0 12px; padding-left: 18px; }
.empty-state { border: 1px dashed #d4e4ea; border-radius: 10px; padding: 40px 20px; text-align: center; color: var(--lq-muted); display: flex; flex-direction: column; gap: 6px; background: #f7feff; }
.empty-state b { color: var(--lq-ink-2); }

/* catalog */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; padding: 10px 12px; background: #fff; border: 1px solid var(--lq-line); border-radius: 10px; font-size: 12px; }
.tree-table { background: #fff; border: 1px solid var(--lq-line); border-radius: 10px; overflow: hidden; }
.tree-head, .tree-row { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(160px, 1.2fr) 70px 80px 190px; align-items: center; gap: 8px; padding: 7px 12px; }
.tree-head { background: #f0fbfc; color: var(--lq-muted); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--lq-line); }
.tree-row { border-bottom: 1px solid #eef8fa; font-size: 13px; }
.tree-row:hover { background: #f7feff; }
.tree-row.lv1 { background: #fcfdff; font-weight: 600; }
.tree-row.lv1:hover { background: #f0fbfc; }
.tree-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lv-tag { font-size: 10px; color: var(--lq-muted); background: #eef8fa; border-radius: 4px; padding: 0 4px; flex: 0 0 auto; }
.tree-idea { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.score-ref { margin-top: 3px; font-size: 11px; color: #0f77d6; background: #effafd; border: 1px solid #dbeafe; border-radius: 4px; padding: 1px 5px; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.basis-panel { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 12px; margin: 10px 0 12px; }
.basis-card { border: 1px solid var(--lq-line); border-radius: 10px; background: #fff; padding: 12px 14px; min-width: 0; }
.basis-card h4 { margin: 0 0 6px; font-size: 13px; }
.basis-card p { margin: 0 0 4px; font-size: 12px; color: var(--lq-muted); line-height: 1.6; }
.basis-card .chips { margin-top: 4px; }
@media (max-width: 900px) { .basis-panel { grid-template-columns: 1fr; } }
.tree-page { font-size: 12px; color: var(--lq-ink-2); }
.tree-ops { display: flex; gap: 3px; justify-content: flex-end; }
.options { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.option-card { display: flex; align-items: center; gap: 10px; background: var(--lq-primary-50); border: 1px solid var(--lq-primary-100); border-radius: 8px; padding: 7px 10px; font-size: 12px; }

/* writing */
.write-grid { display: grid; grid-template-columns: 300px 1fr; gap: 14px; }
.chapter-pane, .write-main { background: #fff; border: 1px solid var(--lq-line); border-radius: 10px; overflow: hidden; }
.pane-head { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--lq-line); font-size: 12px; font-weight: 600; background: #f0fbfc; color: var(--lq-ink-2); }
.chapter-items { list-style: none; margin: 0; padding: 6px; max-height: 62vh; overflow: auto; }
.chapter-items li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.chapter-items li:hover { background: #f0fbfc; }
.chapter-items li.active { background: var(--lq-primary-50); color: var(--lq-primary); }
.chapter-items li.parent { color: var(--lq-muted); }
.ch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-side { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.ch-words { font-size: 10px; color: var(--lq-muted); }
.stream-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--lq-line); }
.stream-content { margin: 0; padding: 18px 22px; height: 58vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-family: "PingFang SC", "Microsoft YaHei", serif; font-size: 14px; line-height: 1.9; color: var(--lq-ink); background: #fff; }
.job-box { padding: 8px 12px 0; }
.job-line { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 0; }
.bar { flex: 1; height: 6px; border-radius: 3px; background: #eef8fa; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--lq-primary); border-radius: 3px; transition: width .3s; }
.pill { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 600; background: #eef8fa; color: var(--lq-muted); }
.pill.DONE { background: var(--lq-success-50); color: var(--lq-success); }
.pill.PENDING { background: #eef8fa; color: var(--lq-muted); }
.pill.PAUSED { background: var(--lq-warn-50); color: var(--lq-warn); }
.pill.RUNNING { background: var(--lq-primary-50); color: var(--lq-primary); }
.pill.FAILED, .pill.CANCELLED { background: var(--lq-danger-50); color: var(--lq-danger); }
.big-textarea { min-height: 46vh; font-family: var(--lq-mono); font-size: 13px; line-height: 1.8; }

/* sealed */
.rules-box { background: #fff; border: 1px solid var(--lq-line); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.rules-box summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--lq-ink-2); }
.rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; margin: 12px 0; }
.rule-grid label { margin: 0; }
.sens-box { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 16px; border-top: 1px dashed var(--lq-line); padding-top: 10px; }
.sens-box .side-title { width: 100%; margin: 0 0 4px; }
.numbering-preview { margin-top: 10px; background: #f7feff; border: 1px dashed var(--lq-line); border-radius: 8px; padding: 10px; max-height: 220px; overflow: auto; }
.np-row { font-size: 12px; padding: 2px 0; }
.issue { border: 1px solid var(--lq-line); border-left: 3px solid var(--lq-muted); border-radius: 8px; padding: 9px 12px; background: #fff; }
.issue.sev-P0 { border-left-color: var(--lq-danger); }
.issue.sev-A { border-left-color: var(--lq-warn); }
.issue.sev-B { border-left-color: var(--lq-primary); }
.issue-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.issue-head .btn { margin-left: auto; }

/* export */
.export-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; background: #fff; border: 1px solid var(--lq-line); border-radius: 10px; padding: 14px; margin: 12px 0; }
.export-grid label { margin: 0; }
.table-density-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--lq-line); }
.table-density-row > span:first-child { font-size: 13px; color: var(--lq-muted); }
.table-density { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.table-density .btn.active { border-color: var(--lq-primary); color: var(--lq-primary); background: #effafd; box-shadow: 0 0 0 1px var(--lq-primary) inset; }
.style-section { margin-top: 16px; }
.style-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.style-head > span { font-size: 13px; font-weight: 600; }
.table-style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.table-style-card { border: 1px solid var(--lq-line); background: #fff; border-radius: 8px; padding: 10px 8px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.table-style-card:hover { border-color: #93c5fd; }
.table-style-card.active { border-color: var(--lq-primary); box-shadow: 0 0 0 1px var(--lq-primary) inset; background: #f7feff; }
.table-style-card > span { font-size: 12px; color: var(--lq-muted); }
.mini-table { width: 100%; border-collapse: collapse; font-size: 10px; table-layout: fixed; }
.mini-table th, .mini-table td { border: 1px solid #5f6474; padding: 3px 2px; text-align: center; color: #33334a; white-space: nowrap; overflow: hidden; }
.mini-table th { background: #fff; font-weight: 600; }
.mini-table.style-three-line { border-top: 2px solid #33334a; border-bottom: 2px solid #33334a; }
.mini-table.style-three-line th, .mini-table.style-three-line td { border-left: 0; border-right: 0; border-top: 0; }
.mini-table.style-three-line th { border-bottom: 1px solid #33334a; }
.mini-table.style-borderless th, .mini-table.style-borderless td { border: 0; }
.mini-table.style-borderless th { border-bottom: 1px solid #33334a; }
.mini-table.style-zebra tbody tr:nth-child(even) td { background: #f2f2f2; }
.mini-table.style-zebra th, .mini-table.style-indexed th, .mini-table.style-business th { background: #d9d9d9; }
.mini-table.style-business th { background: #d9e2f3; }
.mini-table.style-blue th { background: #e6f7fc; color: #0c60ab; }
.mini-table.style-blue th, .mini-table.style-blue td { border-color: #188df9; }
.mini-table.style-green th { background: #e2efda; color: #375623; }
.mini-table.style-green th, .mini-table.style-green td { border-color: #548235; }
.mini-table.style-orange th { background: #fce4d6; color: #833c0c; }
.mini-table.style-orange th, .mini-table.style-orange td { border-color: #c55a11; }
.mini-table.style-dark th { background: #404040; color: #fff; }
.mini-table.style-dark th, .mini-table.style-dark td { border-color: #000; }
.mini-table.style-blue-zebra th { background: #e6f7fc; color: #0c60ab; }
.mini-table.style-blue-zebra tbody tr:nth-child(even) td { background: #e6f7fc; }
.mini-table.style-blue-zebra th, .mini-table.style-blue-zebra td { border-color: #188df9; }
.mini-table.style-blue-outline { border-top: 2px solid #188df9; border-bottom: 2px solid #188df9; }
.mini-table.style-blue-outline th, .mini-table.style-blue-outline td { border-left: 0; border-right: 0; border-top: 0; border-color: #188df9; }
.mini-table.style-blue-outline th { border-bottom: 1px solid #188df9; color: #0c60ab; }
.table-editor { display: flex; flex-direction: column; gap: 16px; }
.table-edit-block { border: 1px solid var(--lq-line); border-radius: 8px; padding: 10px; background: #f0fbfc; }
.table-edit-block > label { display: block; margin-bottom: 8px; font-size: 13px; }
.table-edit-block .tbl-caption { margin-left: 8px; width: min(420px, 70%); }
.table-edit-wrap { overflow: auto; background: #fff; border: 1px solid var(--lq-line); border-radius: 6px; }
.edit-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.edit-table th, .edit-table td { border: 1px solid #d4e4ea; padding: 6px 8px; min-width: 80px; vertical-align: top; }
.edit-table th { background: #eef8fa; font-weight: 600; }
.edit-table th:focus, .edit-table td:focus { outline: 2px solid #60a5fa; outline-offset: -2px; background: #fff; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.image-card { border: 1px solid var(--lq-line); border-radius: 8px; overflow: hidden; background: #fff; }
.image-card .img-box { height: 120px; background: #eef8fa; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.image-card .img-check { position: absolute; top: 6px; left: 6px; z-index: 2; background: rgba(255,255,255,.92); border-radius: 4px; padding: 2px 4px; display: flex; }
.image-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-card .img-meta { padding: 8px; font-size: 12px; }
.image-card .img-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.image-card .img-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

/* knowledge */
.kb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.list { background: #fff; border: 1px solid var(--lq-line); border-radius: 10px; overflow: hidden; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #eef8fa; font-size: 13px; }
.list-row:last-child { border-bottom: 0; }
.list-main { min-width: 0; }
.chunk { border: 1px solid var(--lq-line); border-radius: 8px; padding: 9px 11px; background: #f7feff; font-size: 12px; line-height: 1.7; }

/* skills */
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.skill-card { background: #fff; border: 1px solid var(--lq-line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.skill-card p { flex: 1; margin: 0; }
.skill-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gantt { display: flex; flex-direction: column; gap: 6px; }
.gantt-row { display: grid; grid-template-columns: 190px 1fr 40px; align-items: center; gap: 8px; font-size: 12px; }
.gantt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { height: 12px; background: #eef8fa; border-radius: 4px; position: relative; }
.gantt-track i { position: absolute; top: 0; bottom: 0; background: var(--lq-primary); border-radius: 4px; }
.json { background: #16162a; color: #e1eaf0; padding: 12px; border-radius: 8px; overflow: auto; font-size: 12px; font-family: var(--lq-mono); }

/* modal */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .42); display: grid; place-items: center; z-index: 100; padding: 20px; }
#modalRoot { display: none; }
#modalRoot.show { display: block; }
.modal { background: #fff; border-radius: 12px; width: min(560px, 96vw); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 24px 80px rgba(15, 23, 42, .3); }
.modal.wide { width: min(900px, 96vw); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--lq-line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--lq-line); }
.modal-text { color: var(--lq-ink-2); }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--lq-line); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.38); display: none; place-items: center; z-index: 150; backdrop-filter: blur(4px); }
.work-overlay.show { display: grid; animation: maskIn .2s ease; }
.work-card { width: min(560px, 92vw); background: #fff; border-radius: 16px; padding: 30px 34px; box-shadow: 0 30px 90px rgba(15,23,42,.3); text-align: center; animation: modalIn .3s cubic-bezier(.22,.61,.36,1); }
.work-card h3 { font-size: 20px; margin: 14px 0 4px; }
.work-card p { font-size: 12px; }
.work-spinner { display: flex; justify-content: center; gap: 6px; align-items: flex-end; height: 38px; }
.work-spinner i { width: 8px; height: 12px; border-radius: 4px; background: var(--lq-primary); display: block; animation: workbar 1s ease-in-out infinite; }
.work-spinner i:nth-child(2) { animation-delay: .14s; }
.work-spinner i:nth-child(3) { animation-delay: .28s; }
@keyframes workbar { 0%,100% { height: 10px; opacity: .35; } 50% { height: 34px; opacity: 1; } }
.work-steps { margin-top: 18px; text-align: left; display: grid; gap: 2px; }
.work-step { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--lq-muted); transition: all .25s ease; }
.work-step .dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #d4e4ea; display: grid; place-items: center; font-size: 10px; }
.work-step.active { color: var(--lq-primary); background: var(--lq-primary-50); font-weight: 600; }
.work-step.active .dot { border-color: var(--lq-primary); color: var(--lq-primary); animation: pulse 1.2s infinite; }
.work-step.done { color: var(--lq-success); }
.work-step.done .dot { border-color: #99f6e4; background: var(--lq-success-50); color: var(--lq-success); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(29,78,216,.18); } 50% { box-shadow: 0 0 0 6px rgba(29,78,216,.06); } }
.file-btn { display: inline-flex; align-items: center; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.preset-btn { border: 1px solid var(--lq-line); background: #fff; color: var(--lq-ink-2); border-radius: 8px; padding: 7px 14px; font-size: 12px; cursor: pointer; font-family: inherit; transition: all .18s ease; }
.preset-btn:hover { border-color: #bfdbfe; background: #f7feff; transform: translateY(-1px); }
.preset-btn.active { background: var(--lq-primary); border-color: var(--lq-primary); color: #fff; box-shadow: 0 6px 14px -10px rgba(29,78,216,.7); }

@media (max-width: 1100px) {
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid, .kpi-grid.four, .rule-grid, .export-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--lq-line); }
  .doc-list { max-height: 180px; }
  .auth-wrap { grid-template-columns: 1fr; padding: 36px 18px; }
  .auth-art { display: none; }
  .write-grid, .grid-2, .dash-grid, .kb-grid { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; }
  .tree-head, .tree-row { grid-template-columns: 1.4fr 70px 150px; }
  .tree-idea, .tree-head span:nth-child(2) { display: none; }
  .tree-head span:nth-child(4) { display: none; }
  .tree-row > div:nth-child(4) { display: none; }
}
