/* Hourmark 5.0.3: final visual consistency pass.
 * Applied after legacy stylesheet layers. Workflows, layout and scrolling remain unchanged. */
:root[data-hm-theme]{accent-color:var(--hm-accent)}
body[data-hm-theme] :is(.hm-filter-bar,.hm-period-picker,.hm-trends-controls,.trends-controls)
 :is(input,select){color:var(--hm5-text);background:var(--hm-field);border-color:var(--hm5-line);color-scheme:inherit}
body[data-hm-theme] :is(.hm-settings-shortcuts a,.hm-settings-shortcuts button,.hm-detail-note,
 .hm-stat,.hm-surface,.hm-details,.hm-quick-section,.hm-overview-strip,.hm-position,.hm-pay-item,
 .settings-item,.trends-surface,.trend-metric,.money-flow,.work-path-grid button){
 color:var(--hm5-text);border-color:var(--hm5-line);background:var(--hm5-surface)
}
body[data-hm-theme] :is(.hm-settings-shortcuts a,.hm-settings-shortcuts button):hover{background:var(--hm5-raised)}
body[data-hm-theme] :is(.hm-section-heading p,.hm-overview-strip span,.hm-surface small,.hm-detail-note,
 .hm-filter-bar label,.hm-period-picker label,.hm-trends-controls label,.setting-body label){
 color:var(--hm5-muted)
}
body[data-hm-theme] :is(.trends-surface,.trend-metric,.hm-stat,.hm-surface,.hm-details,.hm-position,
 .hm-pay-item,.hm-filter-bar,.settings-item){box-shadow:none}
body[data-hm-theme] .trends-controls label{color:var(--hm5-muted)}
body[data-hm-theme] .trends-controls select{background:var(--hm-field);color:var(--hm5-text);border-color:var(--hm5-line)}
body[data-hm-theme] .trends-unavailable{background:var(--hm-soft);border-color:var(--hm5-line);color:var(--hm-warning)}
body[data-hm-theme] .trends-link-row button{background:var(--hm5-panel);color:var(--hm5-text);border-color:var(--hm5-line)}
body[data-hm-theme] .trends-link-row button:hover{background:var(--hm5-raised)}
body[data-hm-theme] :is(.flow-heading input,.budget-editor-row input,.budget-assignment select,
 .hm-work-history input,.hm-work-history select){background:var(--hm-field);border-color:var(--hm5-line);color:var(--hm5-text);color-scheme:inherit}
body[data-hm-theme] :is(.flow-heading,.flow-grid,.flow-grid button,.flow-basis,.budget-row,.budget-assignment){
 border-color:var(--hm5-line)}
body[data-hm-theme] .flow-grid button:hover{background:var(--hm-soft)}
body[data-hm-theme] .flow-negative{color:var(--hm-danger)!important}
body[data-hm-theme] .budget-row progress{accent-color:var(--hm-success)}
/* Keep the signed-out experience consistent with the selected palette. */
body[data-hm-theme] #horizonAuth{background:var(--hm-main-gradient);color:var(--hm5-text)}
body[data-hm-theme] #horizonAuth .auth-guard-card{background:var(--hm5-surface);color:var(--hm5-text);border-color:var(--hm5-line)}
body[data-hm-theme] #horizonAuth .horizon-auth-art{background:var(--hm5-panel);color:var(--hm5-text);border-color:var(--hm5-line)}
body[data-hm-theme] #horizonAuth :is(h2,.horizon-auth-tagline h2){color:var(--hm5-text)}
body[data-hm-theme] #horizonAuth :is(p,label,.horizon-auth-tagline p,.horizon-auth-support,
 .auth-guard-card p,.horizon-auth-separator){color:var(--hm5-muted)}
body[data-hm-theme] #horizonAuth :is(.horizon-auth-tagline span,.horizon-auth-brand small,
 .horizon-auth-links a,.horizon-auth-links button,.horizon-auth-support a,.horizon-auth-mobile-brand small){
 color:var(--hm-accent)}
body[data-hm-theme] #horizonAuth :is(.horizon-auth-mountain path,.horizon-mark){stroke:var(--hm-accent);color:var(--hm-accent)}
body[data-hm-theme] #horizonAuth :is(input,select){background:var(--hm-field);border-color:var(--hm5-line);color:var(--hm5-text);color-scheme:inherit}
body[data-hm-theme] #horizonAuth :is(input,select)::placeholder{color:var(--hm5-muted)}
body[data-hm-theme] #horizonAuth #horizonMfaSecret{background:var(--hm-field);color:var(--hm5-text);border-color:var(--hm5-line)}
body[data-hm-theme] #horizonAuth .auth-guard-card .eyebrow{color:var(--hm-accent)}
/* Editors: preserve tested heights and pinned mobile save bar, change only colors. */
body[data-hm-theme] :is(#editDialog,#batchWorkDialog,#budgetDialog,#projectManagerDialog,
 .horizon-tool-dialog,.horizon-tool-modal,.work-entry-section){
 background:var(--hm5-surface);color:var(--hm5-text);border-color:var(--hm5-line)
}
body[data-hm-theme] :is(#editDialog,#batchWorkDialog,.horizon-tool-dialog)
 :is(.dialog-head,.dialog-actions,.dialog-shell,.batch-scroll){background:var(--hm5-surface);border-color:var(--hm5-line)}
body[data-hm-theme] :is(#editDialog,#batchWorkDialog,.horizon-tool-dialog)
 :is(input:not([type=checkbox]),select,textarea){background:var(--hm-field);color:var(--hm5-text);border-color:var(--hm5-line);color-scheme:inherit}
body[data-hm-theme] :is(.horizon-tool-dialog,.horizon-tool-modal)
 :is(.tool-list-row,.work-status-box){background:var(--hm5-panel);border-color:var(--hm5-line)}
body[data-hm-theme] #morePagesDialog{background:var(--hm5-surface);color:var(--hm5-text);border-color:var(--hm5-line)}
body[data-hm-theme] :is(#morePagesDialog,#quickFindDialog) :is(button,input){
 color:var(--hm5-text);border-color:var(--hm5-line)}
/* Important overrides of the old 5.0.1 mobile dark-only canvas rules. */
@media(max-width:640px){
 html[data-hm-theme],body[data-hm-theme]{background:var(--hm5-bg)!important}
 body[data-hm-theme] :is(.app-shell,.app-main,#mainArea){background:var(--hm5-bg)!important}
 body[data-hm-theme] .mobile-nav{
  background:var(--hm5-side)!important;border-color:var(--hm5-line)!important;
  box-shadow:0 -4px 18px #00000012!important;
 }
 body[data-hm-theme] .mobile-nav button{color:var(--hm5-muted);min-height:48px}
 body[data-hm-theme] .mobile-nav button.active{background:var(--hm-soft);color:var(--hm-accent)!important}
 body[data-hm-theme] #mainArea{scrollbar-color:var(--hm5-line) transparent}
 body[data-hm-theme] :is(#editDialog,#batchWorkDialog,.horizon-tool-dialog){
  background:var(--hm5-surface);border-color:var(--hm5-line);
 }
}
@media(prefers-reduced-motion:reduce){
 body[data-hm-theme] .hm-theme-tile,body[data-hm-theme] .page.active{transition:none;animation:none}
}
