/* V2.4 · 可切换黑色背景主题 */
.theme-toggle{display:flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid #c8d8d1;border-radius:999px;background:#f6faf8;color:#315e50;cursor:pointer;white-space:nowrap;font:inherit}
.theme-toggle span{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#173f35;color:#f5ca68;font-size:11px;line-height:1}
.theme-toggle b{font-size:12px}
.theme-toggle:hover{border-color:#8fb7a7;background:#edf6f2}

html[data-theme="dark"]{
  color-scheme:dark;
  --navy:#7ed0ad;
  --navy-2:#4ba07d;
  --ink:#edf6f1;
  --muted:#9cadA5;
  --line:#28342f;
  --bg:#070a09;
  --panel:#111714;
  --amber:#e5b750;
  --amber-soft:#302717;
  --red:#ef8b8b;
  --red-soft:#351f20;
  --blue:#72c4a2;
  --blue-soft:#19362c;
  --green:#6fd09c;
  --green-soft:#173528;
  --shadow:0 16px 42px rgba(0,0,0,.34);
  background:#070a09;
}
html[data-theme="dark"] body{background:radial-gradient(circle at 84% -8%,rgba(53,132,99,.15),transparent 34rem),#070a09;color:var(--ink)}
html[data-theme="dark"] .workspace{background:transparent}
html[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#0d1713 0%,#09100d 58%,#050806 100%);border-right:1px solid #202c27;box-shadow:10px 0 32px rgba(0,0,0,.28)}
html[data-theme="dark"] .brand{border-color:#27342f}
html[data-theme="dark"] .brand span,html[data-theme="dark"] .version-line,html[data-theme="dark"] .sidebar-foot p{color:#8ca49a}
html[data-theme="dark"] .nav-item{color:#aebfb8}
html[data-theme="dark"] .nav-item:hover{background:#15211c;border-color:#293a33}
html[data-theme="dark"] .nav-item.active{background:linear-gradient(90deg,rgba(229,183,80,.18),rgba(74,151,119,.09));border-color:#3b3929;color:#fff}
html[data-theme="dark"] .nav-icon{border-color:#3b5148;background:#121d18;color:#a4bcb2}
html[data-theme="dark"] .nav-item.active .nav-icon{background:var(--amber);border-color:var(--amber);color:#102018}
html[data-theme="dark"] .topbar{background:rgba(10,14,12,.92);border-color:#202b26;box-shadow:0 8px 24px rgba(0,0,0,.26)}
html[data-theme="dark"] .topbar h1{color:#edf6f1}
html[data-theme="dark"] .eyebrow{color:#8d9e97}
html[data-theme="dark"] .panel,html[data-theme="dark"] .stepper,html[data-theme="dark"] .workflow-strip,html[data-theme="dark"] .materials-summary>div,html[data-theme="dark"] dialog{background:#111714;border-color:#29362f;box-shadow:0 12px 34px rgba(0,0,0,.26)}
html[data-theme="dark"] .panel-head h2,html[data-theme="dark"] .library-toolbar h2,html[data-theme="dark"] .materials-toolbar h2,html[data-theme="dark"] .process-toolbar h2,html[data-theme="dark"] .dialog-head h2{color:#edf6f1}
html[data-theme="dark"] .section-code{background:linear-gradient(145deg,#34775f,#1a4738);box-shadow:none}
html[data-theme="dark"] .btn{background:#151d19;border-color:#34423c;color:#e7f1ec}
html[data-theme="dark"] .btn:hover,html[data-theme="dark"] .btn.ghost:hover{background:#1b2722;border-color:#4a6a5c;box-shadow:0 8px 22px rgba(0,0,0,.25)}
html[data-theme="dark"] .btn.primary{background:linear-gradient(135deg,#34795f,#1b4c3a);border-color:#418a6d;color:#fff}
html[data-theme="dark"] .avatar{background:#193128;border-color:#2f5546;color:#9ed9c1}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#0d1310;border-color:#36433d;color:#ecf5f0}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#708078}
html[data-theme="dark"] input:hover,html[data-theme="dark"] select:hover,html[data-theme="dark"] textarea:hover{border-color:#4e695d}
html[data-theme="dark"] input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus{border-color:#63b392;box-shadow:0 0 0 3px rgba(99,179,146,.17)}
html[data-theme="dark"] option{background:#111714;color:#edf6f1}

html[data-theme="dark"] .project-status{background:linear-gradient(110deg,#14231d,#0e1612);border-color:#2b453a;box-shadow:0 8px 24px rgba(0,0,0,.2)}
html[data-theme="dark"] .project-help,html[data-theme="dark"] .project-source-note,html[data-theme="dark"] .material-note,html[data-theme="dark"] .fine-print,html[data-theme="dark"] label small,html[data-theme="dark"] .project-form-grid label span{color:#9cadA5}
html[data-theme="dark"] .upload-zone,html[data-theme="dark"] .reference-upload{background:linear-gradient(180deg,#111b16,#0d1511);border-color:#46675a}
html[data-theme="dark"] .upload-zone:hover,html[data-theme="dark"] .reference-upload:hover{background:#15261f;border-color:#69ad91}
html[data-theme="dark"] .project-doc-item,html[data-theme="dark"] .recognition-empty,html[data-theme="dark"] .point-info-details,html[data-theme="dark"] .issue-simple-meta>div,html[data-theme="dark"] .template-note,html[data-theme="dark"] .sync-limit,html[data-theme="dark"] .project-extract-summary,html[data-theme="dark"] .project-source-note,html[data-theme="dark"] .material-note,html[data-theme="dark"] .transfer-status,html[data-theme="dark"] .rule-footer{background:#161e1a;border-color:#2b3933;color:#dce8e2}
html[data-theme="dark"] .project-doc-icon,html[data-theme="dark"] .upload-icon,html[data-theme="dark"] .transfer-icon{background:#1b3a2e;color:#8ed0b5}
html[data-theme="dark"] .project-extract-summary.success,html[data-theme="dark"] .project-source-note.confirmed{background:#173528;color:#88cda8;border-color:#315d48}
html[data-theme="dark"] .project-extract-summary.working{background:#302717;color:#e2c078;border-color:#66532d}
html[data-theme="dark"] .project-form-grid input.field-missing,html[data-theme="dark"] .project-form-grid textarea.field-missing{background:#2b2316;border-color:#a77a34}

html[data-theme="dark"] .step{background:#111714;border-color:#28352f}
html[data-theme="dark"] .step:hover{background:#17211c}
html[data-theme="dark"] .step.active{background:linear-gradient(180deg,#252116,#1c1810)}
html[data-theme="dark"] .step span{background:#202b26;color:#9eafa7}
html[data-theme="dark"] .point-tab,html[data-theme="dark"] .photo-card,html[data-theme="dark"] .issue-summary-card,html[data-theme="dark"] .defect-subtype,html[data-theme="dark"] .process-option,html[data-theme="dark"] .mode-card,html[data-theme="dark"] .dynamic-field{background:#121916;border-color:#2c3933;color:#edf6f1}
html[data-theme="dark"] .point-tab:hover{border-color:#567164}
html[data-theme="dark"] .point-tab.active{border-color:#b58b3d;background:#191912;box-shadow:inset 3px 0 var(--amber)}
html[data-theme="dark"] .photo-card.placeholder{background:linear-gradient(135deg,#1c2722,#111714)}
html[data-theme="dark"] .photo-card .photo-index{background:#101713;color:#a6d6c2}
html[data-theme="dark"] .recognition-empty.ready,html[data-theme="dark"] .issue-summary-card.approved{background:#163126;border-color:#38684f}
html[data-theme="dark"] .count-chip{background:#351f20;color:#ef9797}
html[data-theme="dark"] .point-info-details[open] summary,html[data-theme="dark"] .defect-subtype>header,html[data-theme="dark"] .issue-editor-head{background:#151d19;border-color:#2a3831}
html[data-theme="dark"] .defect-subtype-list,html[data-theme="dark"] .defect-subtype .process-block{background:#0c110f}
html[data-theme="dark"] .defect-subtype .issue-editor{background:#111714;border-color:#2c3a34}
html[data-theme="dark"] .photo-link,html[data-theme="dark"] .photo-link.linked{background:#101612;border-color:#2d3c35;color:#eef6f2}
html[data-theme="dark"] .photo-link-visual,html[data-theme="dark"] .process-photo-strip figure{background:#1b2520}
html[data-theme="dark"] .process-option.selected{background:#13241d;border-color:#447c66}
html[data-theme="dark"] .process-option.confirmed{background:#14271e;border-color:#4f8d6f}
html[data-theme="dark"] .process-code,html[data-theme="dark"] .thinking-rule-chip{background:#1b3b2f;color:#9ad7bd}
html[data-theme="dark"] .parameter-summary li,html[data-theme="dark"] .process-evidence>p,html[data-theme="dark"] .process-evidence details{background:#171f1b;color:#9cadA5}
html[data-theme="dark"] .process-evidence p b{color:#edf6f1}
html[data-theme="dark"] .choose-process{background:#111714;border-color:#5a937b;color:#9bd4bc}
html[data-theme="dark"] .process-option.selected .choose-process,html[data-theme="dark"] .process-option.confirmed .choose-process{background:#2d7459;border-color:#4b9a79;color:#fff}

html[data-theme="dark"] .mode-card.selected{background:#173027;border-color:#4f8d73}
html[data-theme="dark"] .check-row{background:#131b17;border-color:#34453d;color:#e7f1ec}
html[data-theme="dark"] .check-row:hover{background:#17231e;border-color:#4f7565}
html[data-theme="dark"] .check-row:focus-within{border-color:#63b392;box-shadow:0 0 0 3px rgba(99,179,146,.14)}
html[data-theme="dark"] .check-row span{color:#e7f1ec}
html[data-theme="dark"] .check-row input{accent-color:#69c99a}
html[data-theme="dark"] .reference-template-analysis{background:#0d1310;border-color:#2e4038}
html[data-theme="dark"] .reference-template-status{background:#302719;color:#ddc383;border-color:#d0a34a}
html[data-theme="dark"] .reference-template-status.working{background:#173027;color:#9bd1ba}
html[data-theme="dark"] .reference-template-status.success{background:#163126;color:#8fd0ad}
html[data-theme="dark"] .reference-template-status.error{background:#351f20;color:#efaaaa}
html[data-theme="dark"] .reference-outline>span,html[data-theme="dark"] .reference-mapping-item b{color:#e8f3ee}
html[data-theme="dark"] .reference-mapping-item{background:#121916;border-color:#2b3a33}
html[data-theme="dark"] .reference-mapping-item>span{background:#1a3a2e;color:#91d2b6}
html[data-theme="dark"] .plan-cover,html[data-theme="dark"] .status-ribbon,html[data-theme="dark"] .preflight-summary,html[data-theme="dark"] .defect-major-head{background:linear-gradient(125deg,#17382c 0%,#0d2119 72%,#091711 100%);box-shadow:0 14px 32px rgba(0,0,0,.28)}
html[data-theme="dark"] .outline-row{border-color:#293730}
html[data-theme="dark"] .draft-warning{background:#2e2517;color:#dfc384;border-color:#66532d}

html[data-theme="dark"] .materials-summary b,html[data-theme="dark"] .material-system,html[data-theme="dark"] .diff-grid span{color:#8fd2b5}
html[data-theme="dark"] .material-empty{background:#0e1411;border-color:#33413b}
html[data-theme="dark"] .library-release{background:#142b22;border-color:#34634d}
html[data-theme="dark"] .library-tabs{border-color:#33413b}
html[data-theme="dark"] .library-tabs button{color:#96a79f}
html[data-theme="dark"] .library-tabs button.active{color:#e9f3ee}
html[data-theme="dark"] .library-tabs span,html[data-theme="dark"] .simple-status-item{background:#1a2420;color:#a9bab2}
html[data-theme="dark"] .library-tabs button.daily-maintenance::after{background:#3a2d17;color:#e6bd69}html[data-theme="dark"] .library-purpose{background:#101713;border-color:#33413b}html[data-theme="dark"] .library-purpose b,html[data-theme="dark"] .thinking-audit b,html[data-theme="dark"] .thinking-boundary>b{color:#edf6f1}html[data-theme="dark"] .library-purpose p,html[data-theme="dark"] .library-purpose aside small{color:#9cada5}html[data-theme="dark"] .maintenance-badge.daily{background:#3a2d17;color:#e6bd69}html[data-theme="dark"] .maintenance-badge.periodic{background:#172839;color:#8cb8dd}html[data-theme="dark"] .maintenance-badge.review{background:#202923;color:#aebdb5}html[data-theme="dark"] .maintenance-badge.automatic{background:#173528;color:#78ca9c}
html[data-theme="dark"] .table-scroll,html[data-theme="dark"] .project-material-table{border-color:#2c3933}
html[data-theme="dark"] th{background:linear-gradient(180deg,#1d4b3b,#102a20)}
html[data-theme="dark"] td{border-color:#25322c;color:#dce7e2}
html[data-theme="dark"] tbody tr:nth-child(even){background:#141b18}
html[data-theme="dark"] tbody tr:hover{background:#1a2822}
html[data-theme="dark"] .filter-pills button{background:#1a2420;color:#aebfb7}
html[data-theme="dark"] .filter-pills button.active{background:#397e63;color:#fff}
html[data-theme="dark"] .gate-row{border-color:#27342e}

html[data-theme="dark"] .decision-guide-status,html[data-theme="dark"] .professional-switch,html[data-theme="dark"] .data-transfer-button,html[data-theme="dark"] .theme-toggle{background:#131b17;border-color:#33463d;color:#a8cfbd}
html[data-theme="dark"] .theme-toggle span{background:#e5b750;color:#111a15}
html[data-theme="dark"] .professional-switch span{color:#bdcbc4}
html[data-theme="dark"] .autosave-status{background:#173528;color:#78ca9c}
html[data-theme="dark"] .transfer-card,html[data-theme="dark"] .thinking-guide-meta>div,html[data-theme="dark"] .diff-grid>div{background:#121916;border-color:#2c3933;color:#edf6f1}
html[data-theme="dark"] .transfer-card:hover{background:#17251f;border-color:#4d806b}
html[data-theme="dark"] .thinking-guide-note,html[data-theme="dark"] .dialog-note{background:#302717;color:#dcc07e}
html[data-theme="dark"] .thinking-audit{background:#142b22;border-color:#34634d}html[data-theme="dark"] .thinking-audit p,html[data-theme="dark"] .thinking-boundary li{color:#aebdb5}html[data-theme="dark"] .thinking-boundary{border-color:#2c3933}html[data-theme="dark"] .thinking-boundary p{background:#131b17}html[data-theme="dark"] .thinking-boundary p span{color:#dce7e2}html[data-theme="dark"] .thinking-boundary p em{color:#78ca9c}
html[data-theme="dark"] .thinking-human-boundary,html[data-theme="dark"] .thinking-principles article,html[data-theme="dark"] .thinking-flow>div{background:#101713;border-color:#33413b}html[data-theme="dark"] .thinking-human-boundary b,html[data-theme="dark"] .thinking-section-head>b,html[data-theme="dark"] .thinking-principles b,html[data-theme="dark"] .thinking-flow b,html[data-theme="dark"] .thinking-rule-sample span b{color:#edf6f1}html[data-theme="dark"] .thinking-human-boundary p,html[data-theme="dark"] .thinking-principles p,html[data-theme="dark"] .thinking-flow p{color:#9cada5}html[data-theme="dark"] .thinking-section-head{border-color:#33413b}html[data-theme="dark"] .thinking-section-head>span{background:#173528;color:#78ca9c}html[data-theme="dark"] .thinking-feedback{background:#10251c;border-color:#315843}html[data-theme="dark"] .thinking-feedback>div span{background:#131b17;border-color:#33413b;color:#dce7e2}html[data-theme="dark"] .thinking-feedback>p,html[data-theme="dark"] .thinking-feedback>small{color:#aebdb5}
html[data-theme="dark"] dialog::backdrop{background:rgba(0,0,0,.74)}
html[data-theme="dark"] .toast{background:#e8efeB;color:#101512;box-shadow:0 16px 40px rgba(0,0,0,.42)}
html[data-theme="dark"] .word-download{background:#122019;border-color:#4b806a;color:#9dd6be}
html[data-theme="dark"] .word-download span{background:#3a7e63;color:#fff}
html[data-theme="dark"] .material-ingest-panel .panel-head p,html[data-theme="dark"] .material-import-result span{color:#9cada5}
html[data-theme="dark"] .material-import-result,html[data-theme="dark"] .material-choice-dialog .material-form-section{background:#131b17;border-color:#2c3933}
html[data-theme="dark"] .material-choice-dialog .material-form-section>b{color:#8fd2b5}
html[data-theme="dark"] .count-chip.neutral{background:#1a2a23;color:#9dd2bb}

@media(max-width:1200px){.theme-toggle b{display:none}.theme-toggle{padding:8px}}
@media(max-width:720px){.theme-toggle{padding:8px}.theme-toggle span{width:16px;height:16px}}
