/* 本文件由 scripts/tools/build-shell.mjs 从客户 Demo 原样抽取，请勿手改。
 * 来源：legacy/demo/环翠复议智能助理-demo-v7.html
 * 追加样式写在 web/css/app-extra.css，避免下次抽取被覆盖。
 */
* { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 13px;
    color: #334155;
    background: #eef2f6;
    overflow: hidden;
  }
  button, input, select { font-family: inherit; font-size: inherit; outline: none; }
  button { cursor: pointer; }

  /* ============ 布局 ============ */
  .app { display: flex; height: 100vh; }

  /* 左侧导航 */
  .sidebar {
    width: 72px; flex-shrink: 0;
    background: #0e2a47;
    display: flex; flex-direction: column;
    padding-top: 6px;
  }
  .brand {
    height: 46px; display: flex; align-items: center; justify-content: center;
    color: #7fb4e8; margin-bottom: 6px;
  }
  .brand svg { width: 22px; height: 22px; }
  .nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 66px; padding: 8px 2px;
    color: #a9bfd6; cursor: pointer; position: relative;
    transition: background .15s, color .15s;
  }
  .nav-item svg { width: 21px; height: 21px; margin-bottom: 5px; }
  .nav-item span { font-size: 11px; line-height: 1.25; text-align: center; }
  .nav-item:hover { background: #15385c; color: #dce9f6; }
  .nav-item.active { background: #175294; color: #ffffff; }
  .nav-item.active::after {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: #4da3ff;
  }

  /* 主区域 */
  .main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

  /* 顶部栏 */
  .topbar {
    height: 46px; flex-shrink: 0; background: #ffffff;
    border-bottom: 1px solid #dfe6ee;
    display: flex; align-items: stretch;
  }
  .search-box {
    width: 172px; flex-shrink: 0;
    display: flex; align-items: center; gap: 6px;
    padding: 0 12px; margin: 7px 0 7px 10px;
    background: #f5f7fa; border: 1px solid #e2e8f0; border-radius: 4px;
    color: #94a3b8;
  }
  .search-box svg { width: 14px; height: 14px; flex-shrink: 0; }
  .search-box input { border: none; background: transparent; width: 100%; color: #475569; }
  .tabs { display: flex; align-items: stretch; margin-left: 6px; }
  .tab {
    min-width: 96px; padding: 0 16px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    color: #64748b; cursor: pointer; border-right: 1px solid #eef2f6;
    position: relative;
  }
  .tab:hover { color: #1e40af; }
  .tab.active { color: #1d4ed8; background: #f8fbff; }
  .tab.active::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #2563eb;
  }
  .tab .close { font-size: 14px; color: #94a3b8; line-height: 1; }
  .tab .close:hover { color: #ef4444; }

  /* 内容区 */
  .content {
    flex: 1; display: flex; flex-direction: column;
    margin: 8px; background: #ffffff;
    border: 1px solid #dfe6ee; border-radius: 3px;
    overflow: hidden; min-height: 0;
  }

  /* 工具栏 */
  .toolbar {
    flex-shrink: 0; padding: 10px 14px;
    border-bottom: 1px solid #e8edf3;
    background: #fcfdff;
  }
  .tool-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  }
  .tool-row + .tool-row { margin-top: 9px; }
  .field-label { color: #475569; white-space: nowrap; }
  .field-label .req { color: #ef4444; margin-right: 2px; }
  .input, .select {
    height: 30px; border: 1px solid #cbd5e1; border-radius: 3px;
    background: #fff; padding: 0 9px; color: #334155;
  }
  .input { width: 150px; }
  .input::placeholder { color: #adb9c9; }
  .input:focus, .select:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.12); }
  .select { min-width: 120px; padding-right: 24px; cursor: pointer; }

  .btn {
    height: 30px; padding: 0 13px; border-radius: 3px;
    border: 1px solid #cbd5e1; background: #fff; color: #475569;
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
    transition: all .15s;
  }
  .btn:hover { filter: brightness(.97); }
  .btn-blue { border-color: #93c5fd; background: #eaf3ff; color: #1d4ed8; }
  .btn-green { border-color: #86efac; background: #ecfdf3; color: #15803d; }
  .btn-primary { border-color: #2563eb; background: #2563eb; color: #fff; }
  .btn-primary:hover { background: #1d4ed8; }
  .btn svg { width: 13px; height: 13px; }

  .spacer { flex: 1; }

  /* 新增子板块 */
  .subpanel {
    margin-top: 10px; border: 1px dashed #93c5fd; border-radius: 5px;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
    padding: 10px 12px 12px;
  }
  .subpanel-head {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  }
  .subpanel-title {
    font-weight: 600; color: #1e40af; font-size: 13px;
    display: flex; align-items: center; gap: 6px;
  }
  .subpanel-title svg { width: 15px; height: 15px; }
  .badge-new {
    background: #2563eb; color: #fff; font-size: 10px; line-height: 1;
    padding: 3px 6px; border-radius: 9px; font-weight: 600;
  }
  .badge-src {
    background: #eef2ff; color: #4338ca; font-size: 11px;
    padding: 2px 8px; border-radius: 10px;
  }
  .match-tip {
    margin-left: auto; font-size: 11px; color: #64748b;
    display: flex; align-items: center; gap: 5px;
  }
  .dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
  .dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }

  .cascade {
    display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px;
  }
  .cascade-item { display: flex; flex-direction: column; gap: 4px; }
  .cascade-item label { font-size: 11px; color: #64748b; }
  .cascade-item .select { min-width: 155px; }
  .arrow { color: #94a3b8; padding-bottom: 7px; }
  .arrow svg { width: 15px; height: 15px; }
  .law-box {
    flex: 1; min-width: 210px; height: 30px;
    display: flex; align-items: center; gap: 6px;
    padding: 0 10px; border: 1px solid #e2e8f0; border-radius: 3px;
    background: #f8fafc; color: #475569; font-size: 12px;
  }
  .law-box svg { width: 13px; height: 13px; color: #6366f1; flex-shrink: 0; }
  .law-box.empty { color: #a8b4c4; }
  .cascade-hint {
    margin-top: 9px; font-size: 11px; color: #94a3b8;
    display: flex; align-items: center; gap: 5px;
  }
  .cascade-hint svg { width: 12px; height: 12px; }
  .review-box {
    margin-top: 10px; padding: 9px 12px; border: 1px solid #e6ead8; border-radius: 4px;
    background: #fbfdf5; font-size: 12px; color: #4d5640; line-height: 1.75;
  }
  .review-box.empty { display: none; }
  .review-box .rb-head { display: flex; align-items: center; gap: 5px; font-weight: 600; color: #65803a; margin-bottom: 4px; }
  .review-box .rb-head svg { width: 13px; height: 13px; }
  .review-box .rb-body { white-space: pre-line; }

  /* 编辑器 */
  .editor { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .editor-toolbar {
    flex-shrink: 0; min-height: 36px;
    display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
    padding: 4px 10px; border-bottom: 1px solid #e8edf3; background: #fafbfd;
  }
  .ed-btn {
    min-width: 26px; height: 26px; padding: 0 5px;
    border: none; background: transparent; border-radius: 3px;
    color: #475569; display: inline-flex; align-items: center; justify-content: center;
  }
  .ed-btn:hover { background: #e8eef7; }
  .ed-btn svg { width: 14px; height: 14px; }
  .ed-sep { width: 1px; height: 16px; background: #dbe3ec; margin: 0 4px; }
  .ed-select {
    height: 24px; border: 1px solid transparent; background: transparent;
    border-radius: 3px; color: #475569; padding: 0 4px; cursor: pointer;
  }
  .ed-select:hover { background: #e8eef7; }
  .editor-body {
    flex: 1; overflow: auto; padding: 20px 26px;
    outline: none; line-height: 1.9; color: #253346;
    min-height: 120px;
  }
  .editor-body:empty::before {
    content: attr(data-placeholder); color: #b3bfcd;
  }
  .editor-body h1 { font-size: 22px; text-align: center; margin: 6px 0 18px; }
  .editor-body p { margin: 8px 0; text-indent: 2em; }
  .editor-body .noindent { text-indent: 0; }

  /* 底部状态栏 */
  .statusbar {
    flex-shrink: 0; height: 26px; border-top: 1px solid #e8edf3;
    background: #fafbfd; display: flex; align-items: center;
    padding: 0 14px; gap: 16px; font-size: 11px; color: #94a3b8;
  }
  .statusbar .right { margin-left: auto; }

  /* ============ 文书纠错 ============ */
  .view { display: none; }
  .view.show { display: flex; }
  .corr-body { flex: 1; display: flex; min-height: 0; }
  .corr-docs { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .corr-doc-wrap { flex: 1; display: flex; min-height: 0; }
  .corr-doc {
    flex: 1; min-width: 0; overflow: auto; background: #f3f5f9;
    padding: 18px; display: flex; justify-content: center;
  }
  .corr-ai-col { flex: 1; min-width: 0; border-left: 1px solid #e2e8f0; display: flex; flex-direction: column; }
  .corr-ai-doc {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding: 22px 30px;
    font-family: "SimSun","宋体",serif; font-size: 13.5px; line-height: 2;
    color: #1f2937; min-height: 0; background: #fff;
  }
  .corr-ai-doc[contenteditable="true"] { outline: none; }
  .corr-ai-doc[contenteditable="true"]:focus { box-shadow: inset 0 0 0 2px rgba(59,130,246,.08); }
  .corr-ai-doc .p-title { font-size: 19px; font-weight: bold; text-align: center; letter-spacing: 2px; }
  .corr-ai-doc .p-sub { text-align: center; font-size: 13px; }
  .corr-ai-doc .p-docno { text-align: center; margin: 4px 0 16px; }
  .corr-ai-doc p { margin: 6px 0; text-indent: 2em; }
  .corr-ai-doc p.p-noindent { text-indent: 0; }
  .corr-ai-doc p.p-sign { text-align: right; margin-top: 22px; }
  .corr-doc::-webkit-scrollbar, .corr-ai-doc::-webkit-scrollbar { width: 9px; }
  .corr-ai-doc::-webkit-scrollbar-track { background: #f1f5f9; }
  .corr-ai-doc::-webkit-scrollbar-thumb { background: #c3cedb; border-radius: 6px; border: 2px solid #f1f5f9; }
  .paper {
    width: 100%; max-width: 760px; background: #fff; min-height: 100%;
    padding: 40px 52px; box-shadow: 0 1px 6px rgba(15,23,42,.08);
    font-family: "SimSun","宋体",serif; font-size: 14px; color: #1a1a1a; line-height: 2;
  }
  .paper .p-title { font-size: 22px; font-weight: bold; text-align: center; letter-spacing: 2px; }
  .paper .p-sub { font-size: 15px; text-align: center; margin-top: 2px; }
  .paper .p-docno { text-align: center; margin: 6px 0 22px; }
  .paper p { margin: 6px 0; text-indent: 2em; }
  .paper p.p-noindent { text-indent: 0; }
  .paper p.p-sign { text-align: right; margin-top: 26px; }
  .err {
    background: #fff1f0; border-bottom: 2px solid #f97316; border-radius: 2px;
    padding: 0 1px; cursor: pointer; transition: all .15s;
  }
  .err:hover { background: #ffe0dc; }
  .err.active { background: #ffd8d2; box-shadow: 0 0 0 2px rgba(249,115,22,.25); }
  .err.resolved { background: #eafaef; border-bottom-color: #22c55e; }
  .corr-side {
    width: 400px; flex-shrink: 0; border-left: 1px solid #e2e8f0;
    display: flex; flex-direction: column; background: #fff; min-height: 0;
  }
  .corr-side-head {
    padding: 12px 14px 10px; border-bottom: 1px solid #e8edf3; background: #fcfdff; flex-shrink: 0;
  }
  .corr-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .sum-chip { font-size: 11px; padding: 3px 9px; border-radius: 12px; background: #f1f5f9; color: #475569; }
  .sum-chip.red { background: #fef2f2; color: #dc2626; }
  .sum-chip.orange { background: #fff7ed; color: #ea580c; }
  .sum-chip.blue { background: #eff6ff; color: #2563eb; }
  .sum-chip.green { background: #f0fdf4; color: #16a34a; }
  .filter-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
  .filter-row .select { height: 27px; min-width: 110px; }
  .issue-list { flex: 1; overflow: auto; padding: 10px 12px; }
  .issue-card {
    border: 1px solid #e2e8f0; border-radius: 6px; padding: 10px 11px;
    margin-bottom: 9px; background: #fff; transition: all .15s; cursor: pointer;
  }
  .issue-card:hover { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(37,99,235,.07); }
  .issue-card.active { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.12); }
  .issue-card.done { opacity: .62; }
  .ic-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
  .ic-num {
    width: 19px; height: 19px; border-radius: 50%; background: #fff7ed; color: #ea580c;
    border: 1px solid #fed7aa; font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .ic-cat { font-size: 10px; padding: 2px 7px; border-radius: 9px; font-weight: 600; }
  .cat-事实矛盾 { background: #fef2f2; color: #dc2626; }
  .cat-用语规范 { background: #fff7ed; color: #ea580c; }
  .cat-法律依据 { background: #eff6ff; color: #2563eb; }
  .cat-格式规范 { background: #f5f3ff; color: #7c3aed; }
  .ic-title { font-size: 12px; font-weight: 600; color: #1e293b; flex: 1; }
  .ic-loc { font-size: 10px; color: #94a3b8; }
  .ic-body { font-size: 11.5px; color: #64748b; line-height: 1.65; padding-left: 26px; }
  .ic-old { color: #dc2626; text-decoration: line-through; }
  .ic-new { color: #16a34a; font-weight: 600; }
  .ic-actions { display: flex; gap: 6px; margin-top: 8px; padding-left: 26px; }
  .mini-btn {
    height: 24px; padding: 0 9px; font-size: 11px; border-radius: 3px;
    border: 1px solid #cbd5e1; background: #fff; color: #475569;
  }
  .mini-btn:hover { border-color: #93c5fd; }
  .mini-btn.apply { border-color: #86efac; background: #f0fdf4; color: #15803d; }
  .mini-btn.ignore { border-color: #e2e8f0; color: #94a3b8; }
  .ic-done-tag { margin-left: auto; align-self: center; font-size: 10px; color: #16a34a; }
  .corr-empty { text-align: center; color: #94a3b8; padding: 40px 10px; font-size: 12px; }

  /* 提示气泡 */
  .toast {
    position: fixed; left: 50%; top: 24px; transform: translateX(-50%) translateY(-16px);
    background: #1e293b; color: #fff; padding: 9px 18px; border-radius: 5px;
    font-size: 13px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 99;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  /* ============ 文书生成分步流程 & 工作台 ============ */
  .hidden { display: none !important; }

  /* 子板块右侧：决定结果 + 确定 */
  .step-confirm {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 12px; padding-top: 11px; border-top: 1px solid #e2e8f0;
  }
  .step-confirm .tip { font-size: 11px; color: #94a3b8; margin-left: 4px; }

  /* 工作台工具条 */
  .workbench {
    flex: 1; display: flex; flex-direction: column; min-height: 0;
  }
  .wb-toolbar {
    flex-shrink: 0; min-height: 38px; display: flex; align-items: center;
    gap: 8px; flex-wrap: wrap; padding: 5px 12px;
    border-bottom: 1px solid #e8edf3; background: #fcfdff;
  }
  .wb-toolbar .divider { width: 1px; height: 18px; background: #dbe3ec; margin: 0 3px; }
  .doc-switch { display: inline-flex; border: 1px solid #d7e0ea; border-radius: 4px; overflow: hidden; }
  .doc-switch .ds-btn {
    border: none; border-right: 1px solid #d7e0ea; background: #fff; color: #475569;
    padding: 5px 13px; font-size: 12px; cursor: pointer; transition: all .15s; white-space: nowrap;
  }
  .doc-switch .ds-btn:last-child { border-right: none; }
  .doc-switch .ds-btn:hover { background: #f1f5f9; }
  .doc-switch .ds-btn.active { background: #2563eb; color: #fff; font-weight: 600; }
  .doc-badge { display:inline-block; margin-left:6px; padding:1px 8px; border-radius:10px; background:#dbeafe; color:#1d4ed8; font-size:11px; font-weight:600; }
  .doc-badge.ai { background:#dcfce7; color:#15803d; }
  .doc-badge.corr { background:#fef3c7; color:#b45309; }
  .doc-type-banner { display:block; margin:0 0 14px; padding:10px 14px; border-radius:6px; font-size:16px; font-weight:700; letter-spacing:1px; text-align:center; border:1px solid; }
  .doc-type-banner.decision { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
  .doc-type-banner.apply    { background:#f0fdf4; color:#15803d; border-color:#bbf7d0; }
  .doc-type-banner.reply    { background:#fff7ed; color:#c2410c; border-color:#fed7aa; }
  .doc-type-banner.third    { background:#faf5ff; color:#7e22ce; border-color:#e9d5ff; }
  .wb-cols { flex: 1; display: flex; min-height: 0; }
  .wb-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .wb-col + .wb-col { border-left: 1px solid #e2e8f0; }
  .wb-col-head {
    flex-shrink: 0; height: 34px; display: flex; align-items: center; gap: 7px;
    padding: 0 14px; background: #f8fafc; border-bottom: 1px solid #e8edf3;
    font-size: 12px; font-weight: 600; color: #475569;
  }
  .wb-col-head .tag {
    font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 9px;
  }
  .tag-origin { background: #f1f5f9; color: #64748b; }
  .tag-ai { background: #eff6ff; color: #2563eb; }
  .wb-col-head .hint { margin-left: auto; font-size: 10.5px; font-weight: 400; color: #94a3b8; }
  .wb-doc {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding: 22px 30px;
    font-family: "SimSun","宋体",serif; font-size: 13.5px; line-height: 2;
    color: #1f2937; min-height: 0;
  }
  .wb-doc.readonly { background: #fbfcfd; }
  .wb-doc[contenteditable="true"] { outline: none; background: #fff; }
  .wb-doc[contenteditable="true"]:focus { box-shadow: inset 0 0 0 2px rgba(59,130,246,.08); }
  .wb-doc .d-title, .paper .d-title, .corr-ai-doc .d-title { font-size: 19px; font-weight: bold; text-align: center; letter-spacing: 2px; }
  .wb-doc .d-sub, .paper .d-sub, .corr-ai-doc .d-sub { text-align: center; font-size: 13px; }
  .wb-doc .d-docno, .paper .d-docno, .corr-ai-doc .d-docno { text-align: center; margin: 4px 0 16px; }
  .wb-doc p, .paper p, .corr-ai-doc p { margin: 6px 0; text-indent: 2em; }
  .wb-doc p.ni, .paper p.ni, .corr-ai-doc p.ni { text-indent: 0; }
  .wb-doc p.sign, .paper p.sign, .corr-ai-doc p.sign { text-align: right; margin-top: 22px; }
  .wb-doc p.disc, .paper p.disc, .corr-ai-doc p.disc { color: #94a3b8; font-size: 11.5px; font-family: "Microsoft YaHei",sans-serif; line-height: 1.6; }
  .wb-doc p.subt, .paper p.subt, .corr-ai-doc p.subt { margin-top: 16px; color: #1e293b; font-family: "Microsoft YaHei",sans-serif; font-size: 13px; text-indent: 0; }
  .norm-table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-family: "Microsoft YaHei",sans-serif; font-size: 11.5px; line-height: 1.6; }
  .norm-table th, .norm-table td { border: 1px solid #d7e0ea; padding: 5px 8px; text-align: left; vertical-align: top; }
  .norm-table th { background: #eef3f9; color: #334155; font-weight: 600; }
  .norm-table td:first-child { width: 26%; color: #475569; font-weight: 500; background: #fafbfd; }
  .masked { background: #fff3cd; color: #b45309; padding: 0 2px; border-radius: 2px; }
  .ai-change { background: #eafaef; border-bottom: 1px dashed #22c55e; }

  /* 滚动条美化 */
  .wb-doc::-webkit-scrollbar, .corr-doc::-webkit-scrollbar, .paper::-webkit-scrollbar,
  .issue-list::-webkit-scrollbar { width: 9px; }
  .wb-doc::-webkit-scrollbar-track, .corr-doc::-webkit-scrollbar-track, .paper::-webkit-scrollbar-track,
  .issue-list::-webkit-scrollbar-track { background: #f1f5f9; }
  .wb-doc::-webkit-scrollbar-thumb, .corr-doc::-webkit-scrollbar-thumb, .paper::-webkit-scrollbar-thumb,
  .issue-list::-webkit-scrollbar-thumb { background: #c3cedb; border-radius: 6px; border: 2px solid #f1f5f9; }
  .wb-doc::-webkit-scrollbar-thumb:hover, .corr-doc::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

  /* 管理员入口与抽屉 */
  .admin-fab {
    position: fixed; right: 0; top: 50%; transform: translateY(-50%);
    background: #0e2a47; color: #cfe4fb;
    border: none; border-radius: 6px 0 0 6px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 10px 6px; z-index: 40; opacity: .92; transition: all .15s;
    box-shadow: -2px 0 8px rgba(15,23,42,.18);
  }
  .admin-fab:hover { opacity: 1; padding-right: 9px; }
  .admin-fab svg { width: 15px; height: 15px; writing-mode: vertical-rl; }
  .admin-fab .admin-fab-text { writing-mode: vertical-rl; font-size: 12px; letter-spacing: 3px; font-weight: 600; }
  .admin-mask {
    position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 50;
    opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .admin-mask.show { opacity: 1; pointer-events: auto; }
  .admin-drawer {
    position: fixed; right: 0; top: 0; bottom: 0; width: 430px; max-width: 92vw;
    background: #fff; z-index: 60; transform: translateX(100%); transition: transform .25s;
    display: flex; flex-direction: column; box-shadow: -6px 0 24px rgba(15,23,42,.14);
  }
  .admin-drawer.show { transform: translateX(0); }
  .admin-head {
    flex-shrink: 0; padding: 16px 18px; border-bottom: 1px solid #e8edf3;
    display: flex; align-items: center; gap: 9px;
  }
  .admin-head h3 { font-size: 15px; color: #1e293b; }
  .admin-head .x { margin-left: auto; border: none; background: none; font-size: 20px; color: #94a3b8; cursor: pointer; }
  .admin-login { padding: 40px 26px; text-align: center; }
  .admin-login .lock {
    width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%;
    background: #eff6ff; color: #2563eb; display: flex; align-items: center; justify-content: center;
  }
  .admin-login .lock svg { width: 26px; height: 26px; }
  .admin-login p { color: #64748b; font-size: 13px; margin-bottom: 18px; }
  .admin-login input {
    width: 220px; height: 36px; border: 1px solid #cbd5e1; border-radius: 4px;
    padding: 0 12px; text-align: center; letter-spacing: 3px;
  }
  .admin-login input:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.12); }
  .admin-login .err-msg { color: #dc2626; font-size: 12px; margin-top: 10px; height: 16px; }
  .admin-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .admin-stat {
    flex-shrink: 0; display: flex; gap: 8px; padding: 12px 16px;
    border-bottom: 1px solid #e8edf3; background: #fcfdff;
  }
  .admin-stat div { flex: 1; background: #f8fafc; border-radius: 5px; padding: 8px 10px; text-align: center; }
  .admin-stat b { display: block; font-size: 18px; color: #2563eb; }
  .admin-stat span { font-size: 10.5px; color: #94a3b8; }
  .log-list { flex: 1; overflow-y: auto; padding: 12px 16px; }
  .log-item {
    position: relative; padding: 0 0 14px 20px; margin-left: 6px;
    border-left: 2px solid #e2e8f0;
  }
  .log-item:last-child { border-left-color: transparent; }
  .log-item::before {
    content: ""; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px;
    border-radius: 50%; background: #3b82f6; border: 2px solid #fff; box-shadow: 0 0 0 1px #3b82f6;
  }
  .log-item .lt { font-size: 10.5px; color: #94a3b8; }
  .log-item .la { font-size: 12px; font-weight: 600; color: #1e293b; margin: 2px 0 4px; }
  .log-item .ld { font-size: 11px; color: #64748b; line-height: 1.6; }
  .log-item .diff { margin-top: 5px; font-size: 11px; background: #f8fafc; border-radius: 4px; padding: 6px 9px; }
  .log-item .diff .b { color: #dc2626; text-decoration: line-through; }
  .log-item .diff .a { color: #16a34a; }

  /* 响应式 */
  @media (max-width: 900px) {
    .toolbar { overflow-x: auto; }
    .cascade-item .select, .law-box { min-width: 130px; }
  }

/* ============ 新增三板块通用样式 ============ */
.sidebar { overflow-y: auto; }
.np-tab { min-width: 78px; font-size: 12px; }
.np-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px 18px; background: #f5f8fc; }
.np-hd { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 13px; flex-wrap: wrap; }
.np-hd h2 { font-size: 16px; color: #0f2c4d; font-weight: 700; }
.np-hd .np-sub { font-size: 11.5px; color: #64748b; }
.np-hd .np-right { margin-left: auto; font-size: 11px; color: #94a3b8; }
.np-card { background: #fff; border: 1px solid #e2e9f2; border-radius: 5px; margin-bottom: 13px; }
.np-card-hd { padding: 9px 13px; border-bottom: 1px solid #eef2f7; background: #fbfdff;
  display: flex; align-items: center; gap: 8px; font-weight: 600; color: #1e293b; font-size: 12.5px; }
.np-card-hd .np-tip { margin-left: auto; font-weight: 400; font-size: 11px; color: #94a3b8; }
.np-card-bd { padding: 13px; }
.np-stats { display: flex; gap: 11px; flex-wrap: wrap; margin-bottom: 13px; }
.np-stat { flex: 1; min-width: 132px; background: #fff; border: 1px solid #e2e9f2;
  border-radius: 5px; padding: 11px 13px; }
.np-stat .lb { font-size: 11px; color: #64748b; }
.np-stat .vl { font-size: 21px; font-weight: 700; color: #1e3a8a; margin-top: 3px; }
.np-stat .ex { font-size: 10.5px; color: #94a3b8; margin-top: 2px; }
.np-stat.g .vl { color: #15803d; } .np-stat.a .vl { color: #b45309; } .np-stat.b .vl { color: #1d4ed8; }
.np-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.np-table th { background: #f5f8fc; color: #475569; text-align: left; padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0; font-weight: 600; white-space: nowrap; }
.np-table td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.np-table tr:hover td { background: #fafcff; }
.np-table td.np-act { white-space: nowrap; }
.np-tag { display: inline-block; font-size: 10.5px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.np-tag.g { background: #dcfce7; color: #15803d; }
.np-tag.a { background: #fef3c7; color: #b45309; }
.np-tag.b { background: #dbeafe; color: #1d4ed8; }
.np-tag.r { background: #fee2e2; color: #b91c1c; }
.np-tag.n { background: #f1f5f9; color: #64748b; }
.np-mini { border: 1px solid #cbd5e1; background: #fff; color: #475569; font-size: 11px;
  padding: 3px 9px; border-radius: 3px; cursor: pointer; }
.np-mini:hover { border-color: #3b82f6; color: #1d4ed8; }
.np-mini.pri { border-color: #2563eb; background: #2563eb; color: #fff; }
.np-note { font-size: 11px; color: #64748b; line-height: 1.75; background: #f8fafc;
  border-left: 3px solid #93c5fd; padding: 8px 11px; margin-top: 11px; }
.np-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.np-grid3 { display: grid; grid-template-columns: 1.05fr 1fr 1fr; gap: 12px; }
@media (max-width: 1180px) { .np-grid3 { grid-template-columns: 1fr 1fr; } }
/* 上传与脱敏 */
.np-upload { border: 2px dashed #93c5fd; border-radius: 6px; background: #f7fbff;
  padding: 20px; text-align: center; color: #475569; }
.np-upload .uico { width: 34px; height: 34px; color: #3b82f6; margin: 0 auto 7px; }
.np-upload b { display: block; font-size: 13px; color: #1e40af; margin-bottom: 4px; }
.np-upload .usub { font-size: 11px; color: #94a3b8; }
.np-file { margin-top: 11px; background: #fff; border: 1px solid #e2e8f0; border-radius: 4px;
  padding: 9px 11px; display: flex; align-items: center; gap: 9px; font-size: 12px; }
.np-file .fn { font-weight: 600; color: #1e293b; }
.np-file .fm { margin-left: auto; font-size: 10.5px; color: #94a3b8; }
.np-rule { display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9; font-size: 12px; }
.np-rule:last-child { border-bottom: none; }
.np-rule .rn { width: 112px; font-weight: 600; color: #1e293b; flex-shrink: 0; }
.np-rule .rr { flex: 1; color: #64748b; font-size: 11px; }
.np-rule .rh { width: 54px; text-align: center; color: #b45309; font-weight: 600; flex-shrink: 0; }
.np-sw { width: 32px; height: 18px; border-radius: 9px; background: #cbd5e1; position: relative;
  cursor: pointer; flex-shrink: 0; transition: background .15s; }
.np-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; transition: left .15s; }
.np-sw.on { background: #2563eb; } .np-sw.on::after { left: 16px; }
.np-cmp { border: 1px solid #e2e8f0; border-radius: 4px; background: #fff; }
.np-cmp .ch { padding: 7px 11px; font-size: 11px; font-weight: 600; background: #fafcff;
  border-bottom: 1px solid #eef2f7; color: #475569; }
.np-cmp .cb { padding: 11px 12px; font-size: 12px; line-height: 2.05; color: #334155;
  min-height: 146px; white-space: pre-wrap; word-break: break-all; }
.np-hit { background: #fff1f2; color: #be123c; padding: 1px 3px; border-radius: 2px; }
.np-ok { background: #dcfce7; color: #15803d; padding: 1px 3px; border-radius: 2px; }
/* 分权分域 */
.np-rolelist { display: flex; flex-direction: column; gap: 7px; }
.np-role { border: 1px solid #e2e8f0; border-radius: 4px; padding: 9px 11px; cursor: pointer;
  background: #fff; transition: all .15s; }
.np-role:hover { border-color: #93c5fd; }
.np-role.on { border-color: #2563eb; background: #eff6ff; box-shadow: inset 3px 0 0 #2563eb; }
.np-role .rname { font-weight: 600; color: #1e293b; font-size: 12.5px; }
.np-role .rdesc { font-size: 10.5px; color: #94a3b8; margin-top: 3px; line-height: 1.5; }
.np-matrix th.np-c, .np-matrix td.np-c { text-align: center; }
.np-matrix td.np-c { color: #2563eb; font-weight: 700; }
.np-matrix td.np-c.no { color: #cbd5e1; font-weight: 400; }
.np-domain { padding: 9px 0; border-bottom: 1px dashed #e8edf3; }
.np-domain:last-child { border-bottom: none; }
.np-domain .dn { font-size: 12px; font-weight: 600; color: #1e293b; margin-bottom: 5px; }
.np-domain .dv { font-size: 11px; color: #64748b; line-height: 1.7; }
.np-admin-entry { margin-bottom: 12px; padding: 10px; border: 1px solid #e2e8f0;
  border-radius: 4px; background: #f8fafc; display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
