.theme-control{display:flex;align-items:center;position:relative;gap:6px;color:#859479}
.theme-control>.icon{width:15px;height:15px;position:absolute;left:8px;pointer-events:none;z-index:1}
.theme-control select{margin:0;height:32px;width:100px;padding-left:28px;background:#f8faf4;font-size:10px;color:#6f8062;border-color:#e2e7d9;cursor:pointer}
@media(max-width:520px){.top-actions .autosave{display:none}.theme-control select{width:91px}.breadcrumb{min-width:0;gap:6px}.breadcrumb>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px}.top-actions{flex-shrink:0}.topbar{gap:8px}}
@media screen{
  :root[data-theme="dark"]{--bg:#151b17;--paper:#1d251f;--ink:#e2e8d9;--muted:#a0ae97;--green:#a9bd92;--green-dark:#c1d2ac;--green-light:#303e2b;--border:#343e33;color-scheme:dark}
  [data-theme="dark"] :is(.topbar,.settings-panel,.metric,.plan-panel,.parts-panel,.table-footer){background:var(--paper)}
  [data-theme="dark"] .sidebar{background:#19201b}
  [data-theme="dark"] :is(.brand-caption,.nav-label,.version,.sidebar-bottom p,.sidebar-project,.breadcrumb,.autosave,.page-heading p,.eyebrow,.panel-title p,.form-footnote,.parts-header p,.technical-note,.page-footer,.page-footer>span:first-child>span:last-child){color:#a0ae97}
  [data-theme="dark"] :is(.breadcrumb span,.check-row,label,.select-label,.metric-label,.metric-note,.metric-value small,.sheet-caption,.legend,.table-footer,.table-footer>span:first-child,.viewer-mini-hint,.viewer-dimensions,.viewer-hint,.drawer-help,.drawer-card label){color:#b0bea4}
  [data-theme="dark"] :is(.input-unit>span,.check-row .muted,.check-row .icon,th span){color:#99a88d}
  [data-theme="dark"] :is(.nav-item,.view-tab,.icon-button,.subtle){color:#a4b495}
  [data-theme="dark"] :is(.nav-item.active,.nav-item:hover,.new-project,.new-project:hover,.section-icon,.metric.utilization,.sheet-tab.active,.live-update,.drawer-width-note){background:#2b3928;color:#c3d4aa;border-color:#42523a}
  [data-theme="dark"] :is(.nav-count,.count-badge,.small-tag,.unit-tag,.insight-icon,.drawer-card>strong>span){background:#34412d;color:#c2d0ad;border-color:#46523c}
  [data-theme="dark"] .brand-mark{background:#647b51}
  [data-theme="dark"] .avatar{background:#34412d;border-color:var(--paper);outline-color:var(--border);color:#d5e1c2}
  [data-theme="dark"] :is(.input-unit input,select){background:#161e18;border-color:#46503d;color:#e0e8d6}
  [data-theme="dark"] :is(input:hover,select:hover){border-color:#7b9067}
  [data-theme="dark"] :is(input:focus,select:focus){border-color:#a4bb87;outline-color:#43543a}
  [data-theme="dark"] :is(button,a,input,select):focus-visible{outline-color:#b1c995}
  [data-theme="dark"] input[type="checkbox"]{accent-color:#a5be87}
  [data-theme="dark"] .primary{background:#9bb681;color:#182313}
  [data-theme="dark"] .primary:hover{background:#b6cd9f}
  [data-theme="dark"] .secondary{background:#253020;border-color:#526446;color:#c2d5aa}
  [data-theme="dark"] :is(.secondary:hover,.subtle:hover,.icon-button:hover){background:#34432c;color:#e0edcd}
  [data-theme="dark"] :is(h1 #page-view-name,.page-footer>span:first-child,.panel-title.small,.metric-label .icon){color:#aebf9d}
  [data-theme="dark"] .heading-dot{color:#6a7b5a}
  [data-theme="dark"] .utilization .metric-value{color:#c8ddb2}
  [data-theme="dark"] .mini-progress{background:#43513a}
  [data-theme="dark"] .mini-progress>div{background:#b3cb94}
  [data-theme="dark"] .sheet-tab{background:#232e23;color:#b5c4a5;border-color:#44513c}
  [data-theme="dark"] .view-tab.active{color:#c9ddb0}
  [data-theme="dark"] .drawing-surface{background-image:radial-gradient(#3c4a37 .65px,transparent .65px)}
  [data-theme="dark"] #drawing svg>g>rect:first-of-type{fill:#263027;stroke:#718061}
  [data-theme="dark"] #drawing svg #freegrain path{stroke:#3c493e}
  [data-theme="dark"] #drawing svg>g>g[fill="#b1b69f"]{fill:#b0be9e}
  [data-theme="dark"] #drawing svg>g>g[fill="#8d9a7b"],[data-theme="dark"] #drawing svg>g>text[fill="#a8b198"]{fill:#b6c4a4}
  [data-theme="dark"] .drawing-surface .piece.selected rect{stroke:#d0e6b4}
  [data-theme="dark"] .legend-free{background:#263027;border-color:#718061}
  [data-theme="dark"] .legend-kerf{background:repeating-linear-gradient(45deg,#758a63 0 1px,#263027 1px 3px)}
  [data-theme="dark"] :is(.insight,.drawer-card){background:#222e21;border-color:#3c4a34}
  [data-theme="dark"] :is(.insight strong,.drawer-card>strong){color:#c0d3a8}
  [data-theme="dark"] .insight div>span{color:#acbc9a}
  [data-theme="dark"] .insight-badge{color:#b4c5a1;border-color:#495a3e}
  [data-theme="dark"] thead{background:#182019;border-color:var(--border)}
  [data-theme="dark"] th{color:#b1c19e}
  [data-theme="dark"] td{color:#b7c6a6;border-color:#303b2e}
  [data-theme="dark"] :is(td input,.part-name input){color:#d3dfc2}
  [data-theme="dark"] :is(td input:hover,td input:focus){background:#273223;border-color:#62744e}
  [data-theme="dark"] tr.highlighted{background:#34432b}
  [data-theme="dark"] td .icon-button:hover{color:#efba9f;background:#44332c}
  [data-theme="dark"] .drawer-card input:disabled{background:#283322;border-color:#3d4934;color:#a1b08e}
  [data-theme="dark"] :is(.warning,.live-update.has-error){background:#3b3020;border-color:#6e5633;color:#e9c48a}
  [data-theme="dark"] :is(.input-unit input:invalid:not(:focus),td input:invalid){border-color:#ba895c}
  [data-theme="dark"] td input:invalid{background:#392b20}
  [data-theme="dark"] .toast{background:#c1d4a8;color:#192514;box-shadow:0 7px 30px #0005}
  [data-theme="dark"] .expanded{box-shadow:0 0 0 100vmax #080d0ae6}
  [data-theme="dark"] :is(.viewer-3d,.viewer-error){background:#1a231c;border-color:#3b4833;color:#c3d0b3}
  [data-theme="dark"] :is(.viewer-presets,.viewer-controls .door-toggle,.viewer-zoom){background:#202b20ed;border-color:#4c5c40}
  [data-theme="dark"] :is(.viewer-controls button,.viewer-zoom button,.viewer-zoom span){color:#c7d8b3}
  [data-theme="dark"] :is(.viewer-controls button:hover,.viewer-zoom button:hover,.viewer-controls .door-toggle[aria-pressed="true"]){background:#3a4a2f;border-color:#637a4f;color:#daeac6}
  [data-theme="dark"] .viewer-mini-badge{background:#253121dd;border-color:#526344;color:#c4d6ac}
  [data-theme="dark"] .theme-control{color:#c3d4ad}
  [data-theme="dark"] .theme-control select{background:#263123;border-color:#46583c;color:#d4e1c4}
}
@media print{html{color-scheme:light!important}.theme-control{display:none!important}}
