/* MetaHome palette adapted to WGRepair. Screen-only: reports retain light print colors. */
[data-theme-toggle]{min-height:44px;white-space:nowrap}
@media(max-width:600px){.header-inner{flex-wrap:wrap}.header-actions{flex-wrap:wrap;justify-content:flex-end;max-width:100%}[data-theme-toggle]{font-size:12px;padding:8px 10px}}
@media print{[data-theme-toggle]{display:none!important}}
@media screen{
html[data-theme="dark"]{color-scheme:dark;--bg:#00000C;--surface:#0A1118;--surface2:#16242E;--surface-soft:#16242E;--surface-raised:#172B35;--surface-input:#091827;--ink:#F3F8FC;--text:#F3F8FC;--muted:#B7CBD5;--line:#35525C;--brand:#99D6D6;--brand2:#00B3B3;--accent:#009999;--good:#72D8AA;--warn:#F5BE2D;--danger:#FF9DA9;--shadow:0 10px 28px #0006, inset 0 1px 0 #FFFFFF08}
html[data-theme="dark"] .wgcm{--cm-ink:#F3F8FC;--cm-blue:#99D6D6;--cm-line:#35525C;--cm-muted:#B7CBD5}
html[data-theme="dark"],html[data-theme="dark"] body,html[data-theme="dark"] .app-shell,html[data-theme="dark"] main{background:#00000C;color:var(--ink)}
html[data-theme="dark"] .site-header{background:#00000C}
html[data-theme="dark"] :is(.panel,.cm-card,dialog){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(button:not(.line-signin),input[type="submit"],input[type="button"],.btn,.pwa-tools button,.pwa-offline a,.auth-tabs button,.cm-nav a,.wgcm .cm-secondary){background:#172B35;color:#99D6D6;border-color:var(--line)}
html[data-theme="dark"] :is(.btn.primary,.auth-tabs button.active,.wgcm .cm-button,.cm-filters .is-active,.header-actions .committee-entry){background:#009999;color:#00000C;border-color:#009999}
html[data-theme="dark"] :is(.btn,.cm-nav a,.wgcm .cm-secondary):hover{background:#1D3945;color:#FFF}
html[data-theme="dark"] :is(.btn.primary,.wgcm .cm-button):hover{background:#00B3B3;color:#00000C}
html[data-theme="dark"] button:not(.line-signin):disabled{opacity:.5;cursor:not-allowed}
html[data-theme="dark"] .line-signin{background:#06C755!important;color:#FFF!important;border-color:#06C755!important}
html[data-theme="dark"] :is(input,select,textarea,.control,.role-select,.cm-field input:read-only){background:var(--surface-input);color:var(--ink);border-color:#42617C}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#9CB3C6;opacity:1}
html[data-theme="dark"] :focus-visible{outline:2px solid #68DBD0;outline-offset:3px}
html[data-theme="dark"] input{accent-color:#009999}
html[data-theme="dark"] :is(.description,.quality-item,.inspection-card,.line-review,.line-case-status,.cm-decision,.cm-counts>a,.cm-tally span,.cm-tag,.report-filter-note,.report-export-actions,.feedback-dashboard-card,.feedback-dashboard-items>a,.facet-cache-note,.resident-activation-card,.resident-activation-card code,.asset-printer-panel,.asset-print-count,.auth-side,.auth-art,.auth-pane,.auth-tab-panel,.action-dialog-head,.action-dialog-foot,.check-row,.permission-table tr.is-current){background:var(--surface2);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.line-hint,.cm-muted,.facet-cache-note,.pwa-tools p){color:var(--muted)}
html[data-theme="dark"] :is(.data-table th,.permission-table th){background:#172B35;color:var(--muted)}
html[data-theme="dark"] .data-table tr:hover td{background:#1D3945}
html[data-theme="dark"] :is(.badge,.status-pill,.work-status){background:#172B35;color:#99D6D6;border-color:var(--line)}
html[data-theme="dark"] :is(.grade-A,.grade-S,.grade-FS,.btn.danger,.cm-error,.feedback-dashboard-card.overdue){background:#352332;color:#FFADB8;border-color:#99616C}
html[data-theme="dark"] :is(.grade-B,.note,.description.internal,.cm-warning,.line-badge,.feedback-status-in-progress){background:#332E1C;color:#F4D788;border-color:#A78C48}
html[data-theme="dark"] :is(.grade-C,.grade-D){background:#102E45;color:#A5D6FF;border-color:#416984}
html[data-theme="dark"] :is(.grade-E,.grade-F,.feedback-status-not-started){background:#24303D;color:#BFCCDB}
html[data-theme="dark"] :is(.line-badge.verified,.feedback-status-done){background:#12382E;color:#8DE3B8;border-color:#367B61}
html[data-theme="dark"] .line-success{color:#8DE3B8}
html[data-theme="dark"] .comment-card span{background:#17394A;color:#A5D6FF}
html[data-theme="dark"] .bar{background:#243A48}
html[data-theme="dark"] .brand-mark{background:linear-gradient(135deg,#009999,#009999)}
html[data-theme="dark"] dialog::backdrop{background:#00000CB8}
html[data-theme="dark"] .feedback-age-yellow{background:#332E1C!important;border-color:#D9BD58!important}
html[data-theme="dark"] .feedback-age-orange{background:#38281E!important;border-color:#D99A60!important}
html[data-theme="dark"] .feedback-age-red{background:#352332!important;border-color:#CD8B8B!important}
html[data-theme="dark"] .feedback-age-purple{background:#2B2441!important;border-color:#B195C8!important}
html[data-theme="dark"] .feedback-age-note{color:#E2D7EA!important}
/* QR and printed-label previews retain their own light canvas. */
html[data-theme="dark"] .asset-qr-card{background:#FFF;color:#17232E}
html[data-theme="dark"] .asset-qr-card small{color:#52616B}
html[data-theme="dark"] :is(.audit-card,.auth-security-note,.code-builder,.feedback-batch-tools,.feedback-row-select,.feedback-note,.feedback-relation-item,.overview-quick-section,.overview-quick-card,.asset-info-item.status,.asset-form-section){background:var(--surface2);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.feedback-batch-row:hover,.feedback-batch-row:hover .feedback-row-select,.feedback-card:hover,.feedback-relation-item:hover){background:#1D3945}
html[data-theme="dark"] :is(.feedback-category,.overview-quick-icon){background:#17394A;color:#A5D6FF}
html[data-theme="dark"] :is(.success-mark,.overview-quick-repairs .overview-quick-icon){background:#12382E;color:#8DE3B8}
html[data-theme="dark"] :is(.overview-quick-warning,.overview-quick-warning .overview-quick-icon){background:#332E1C;color:#F4D788}
html[data-theme="dark"] .action-error{background:#352332;color:#FFADB8}
html[data-theme="dark"] .feedback-dashboard-card h3 span{background:#009999}
html[data-theme="dark"] .feedback-dashboard-card.overdue h3 span{background:#9A3545}
html[data-theme="dark"] .auth-tabs button[aria-selected="true"]{background:#009999;color:#00000C}
/* Surface hierarchy: page -> panel -> inset section -> raised item.
   Semantic warning/overdue selectors above retain their distinct hues. */
html[data-theme="dark"] :is(.panel,.cm-card){box-shadow:var(--shadow)}
html[data-theme="dark"] :is(.hero-copy,.detail-head,.asset-detail-head,.feedback-detail-head){background:linear-gradient(125deg,#12383E,#0A1118 80%)}
html[data-theme="dark"] .hero-copy{border-radius:var(--radius)}
html[data-theme="dark"] :is(.toolbar,.repair-filter-grid,.cm-nav,.feedback-batch-tools){background:#0D1B2B}
html[data-theme="dark"] .cm-nav{padding:12px;border-radius:12px}
html[data-theme="dark"] :is(.overview-quick-card,.feedback-dashboard-items>a,.line-review,.inspection-card,.comment-card,.feedback-note,.feedback-relation-item,.audit-card){background:var(--surface-raised);box-shadow:0 4px 12px #0003}
html[data-theme="dark"] :is(.overview-quick-card,.feedback-dashboard-items>a,.feedback-relation-item):hover{background:#1D3945}
html[data-theme="dark"] :is(.report-submitbar,.asset-submitbar,.action-dialog-foot){background:#183C48}
html[data-theme="dark"] dialog{background:#20394B;box-shadow:0 24px 80px #0009}
html[data-theme="dark"] .action-dialog-head{background:#172B35}
html[data-theme="dark"] :is(.auth-security-note,.line-case-status,.facet-cache-note){background:#0D1B2B;color:var(--muted)}
html[data-theme="dark"] :is(input,textarea,select):focus{border-color:#68DBD0;box-shadow:0 0 0 3px #68DBD026}
}
