/* v0.23.0 — Slate Contrast COLOURS ONLY.
   No dimensions, spacing, typography, layout or interaction rules belong here.
   Screen-only: approved reports, print templates and signature ink are unchanged.
   Brand actions use orange; operational success/error colours remain semantic. */
@media screen and (forced-colors: none) {
  :root {
    --bg:#f3f5f6; --p:#ffffff; --p2:#eef1f3; --panel:#ffffff;
    --t:#27353e; --m:#617079; --muted:#617079; --l:#dce2e6;
    --o:#9b6005; --ow-green:#9b6005; --ow-navy:#27353e;
    --ow-surface:#ffffff; --ow-raised:#eef1f3; --ow-input:#ffffff;
    --ow-brand-action:#da8708; --ow-brand-action-hover:#c77905;
    --ow-brand-action-ink:#271e11; --ow-brand-line:#f19508;
    --ow-brand-tint:#fff3e0; --ow-brand-focus:#c47908;
    --ow-brand-sidebar:#27353e; --ow-brand-sidebar-text:#dce5e9;
    --ow-brand-sidebar-muted:#afc0ca; --ow-brand-sidebar-line:#42525c;
    --ow-brand-active:#41443c; --ow-brand-active-text:#ffc776;
    --ow-brand-success:#397244; --ow-brand-success-bg:#eaf4ed;
    --ow-brand-success-line:#c7dfce;
  }
  :root[data-ow-theme="dark"] {
    --bg:#151d22; --p:#202b32; --p2:#293640; --panel:#202b32;
    --t:#e8edf0; --m:#b0bfc8; --muted:#b0bfc8; --l:#40515e;
    --o:#ffba4e; --ow-green:#ffba4e; --ow-navy:#1b272f;
    --ow-surface:#202b32; --ow-raised:#293640; --ow-input:#151d22;
    --ow-brand-action:#f1a42d; --ow-brand-action-hover:#ffb74a;
    --ow-brand-tint:#3a3429; --ow-brand-focus:#ffba4e;
    --ow-brand-sidebar:#1b272f;
    --ow-brand-success:#9cdbb9; --ow-brand-success-bg:#203e34;
    --ow-brand-success-line:#436857;
  }

  /* Preserve every component's existing local token names. */
  :root[data-ow-theme] #customers {
    --reg-bg:var(--p); --reg-soft:var(--p2); --reg-line:var(--l);
    --reg-text:var(--t); --reg-muted:var(--m); --reg-green:var(--o);
  }
  :root[data-ow-theme] #customerProfile {
    --pr-bg:var(--p); --pr-soft:var(--p2); --pr-line:var(--l);
    --pr-text:var(--t); --pr-muted:var(--m); --pr-green:var(--o); --pr-tint:var(--ow-brand-tint);
  }
  :root[data-ow-theme] #customerModal {
    --ce-bg:var(--p); --ce-soft:var(--p2); --ce-line:var(--l);
    --ce-text:var(--t); --ce-muted:var(--m); --ce-accent:var(--o);
    --ce-accent-bg:var(--ow-brand-tint); --ce-input:var(--ow-input); --ow-field-muted:var(--m);
  }
  :root[data-ow-theme] #reminders {
    --rm-bg:var(--p); --rm-soft:var(--p2); --rm-line:var(--l);
    --rm-text:var(--t); --rm-muted:var(--m); --rm-green:var(--o);
  }
  :root[data-ow-theme] #v15FormModal {
    --ow-field-bg:var(--ow-input); --ow-field-text:var(--t); --ow-field-muted:var(--m);
    --ow-field-border:var(--l); --ow-field-ring:var(--ow-brand-focus);
  }

  /* Shell: the existing sidebar, logo and navigation retain their geometry. */
  :root[data-ow-theme] .sidebar { background-image:none; background-color:var(--ow-brand-sidebar); color:var(--ow-brand-sidebar-text); }
  :root[data-ow-theme] :is(.nav button,.ow-nav-section summary) { color:var(--ow-brand-sidebar-text); }
  :root[data-ow-theme] :is(.nav button:hover,.ow-nav-section summary:hover) { background-color:#ffffff0e; }
  :root[data-ow-theme] .nav button.active { background-color:var(--ow-brand-active); color:var(--ow-brand-active-text); box-shadow:inset 3px 0 var(--ow-brand-line); }
  :root[data-ow-theme] :is(.nav button.active .ow-nav-icon,.ow-group-active>summary) { color:var(--ow-brand-active-text); }
  :root[data-ow-theme] :is(.ow-nav-children button,.ow-powered-label,.ow-nav-group,.ow-version) { color:var(--ow-brand-sidebar-muted); }
  :root[data-ow-theme] :is(.brand,.ow-sidebar-foot,.ow-nav-children,.ow-settings-link) { border-color:var(--ow-brand-sidebar-line) !important; }
  :root[data-ow-theme] .mobile-topbar { background-color:var(--ow-brand-sidebar); border-color:var(--ow-brand-sidebar-line); }
  :root[data-ow-theme] .mobile-bottom-nav { background-color:var(--p); border-color:var(--l); }
  :root[data-ow-theme] .mobile-bottom-nav button { color:var(--m); }
  :root[data-ow-theme] .mobile-bottom-nav button.active { background-color:var(--ow-brand-tint); color:var(--o); }

  /* Neutral surfaces and text across the existing workspace. */
  :root[data-ow-theme] :is(.card,.panel,.health-card,.dialog,.modal-card,.panel-head,.dialog-head,.dialog-foot,.global-results,.v110-alert,.mobile-job,.v15-form-card,.ow-dash-stat,.ow-dash-panel,.ow-geo-card,.ow-cal-controls,.ow-cal-switch,.ow-form-card,.ow-form-search,.ow-date-popover,.ow-appearance-options label) { background-color:var(--p); border-color:var(--l); }
  :root[data-ow-theme] :is(.site-box,.detail,.month,.sla-preview,.notice,.ow-form-context,.ow-geo-aside,.ow-geo-map-wrap,.ow-week-heading,.ow-form-steps button>span) { background-color:var(--p2); border-color:var(--l); }
  :root[data-ow-theme] :is(.topbar h2,.main>.section>.topbar h2,.panel-head h3,.dialog-head h2,.dialog-head h3,.ow-workspace-name b,.card strong,.main>.section>.cards>.card>strong,.health-card strong,.cc-line b,.ow-dash-heading h2,.ow-dash-stat>strong,.ow-dash-panel-head h3,.ow-dash-row,.ow-dash-row>strong,.ow-dash-rate>div,.ow-geo-heading h3,.ow-geo-ranking-head h4,.ow-geo-ranking-row,.ow-geo-detail-totals b,.ow-geo-record,.ow-geo-unmapped-row b,.ow-form-list-head h3,.ow-form-name,.ow-form-stat strong,.ow-form-context b,.ow-week-heading b,.cal-num),:root[data-ow-theme] #calendarTitle,:root[data-ow-theme] #owGeoDetails h4,:root[data-ow-theme] #owFormStepTitle { color:var(--t); }
  :root[data-ow-theme] :is(.muted,.sub,.form-group label,.main>.section>.topbar p,.main>.section>.cards>.card>small,.card small,.health-card>small,.card .sub,.empty,.ow-workspace-name,.ow-dash-heading p,.ow-dash-stat>span,.ow-dash-stat>small,.ow-dash-today small,.ow-dash-row>span>small,.ow-dash-renewals>small,.ow-dash-renewals>button>span,.ow-dash-renewals p,.ow-dash-rate small,.ow-dash-rate strong.ow-dash-no-data,.ow-dash-status,.ow-dash-queue-item small,.ow-geo-heading p,.ow-geo-eyebrow,.ow-geo-controls label,.ow-geo-ranking-row small,.ow-geo-bottom,.ow-geo-record span,.ow-geo-site>b,.ow-geo-site>small,.ow-geo-unmapped-row small,.ow-geo-detail-totals,.ow-form-stage,.ow-form-stat,.ow-form-context small,.ow-form-steps button,.ow-form-print,.ow-signature-hint,.ow-signature-status,.ow-cal-totals,.ow-form-empty),:root[data-ow-theme] #owGeoDetails>p,:root[data-ow-theme] #owGeoDetails h5,:root[data-ow-theme] #owGeoUnmappedRows>p,:root[data-ow-theme] #owDashQueueNote,:root[data-ow-theme] #owFormCount,:root[data-ow-theme] #owFormStepHelp,:root[data-ow-theme] #owFormStepPosition,:root[data-ow-theme] #owFormReference { color:var(--m); }
  :root[data-ow-theme] :is(.table th,.cal-head,.ow-cal-view-month .cal-head) { background-color:var(--p2); color:var(--m); border-color:var(--l); }
  :root[data-ow-theme] :is(.table td,.list-item,.contract-list-item,.doc-item,.audit-item,.system-row,.global-result,.ow-dash-panel-head,.ow-dash-today,.ow-dash-row,.ow-dash-rate,.ow-form-list-head,.ow-form-steps,.ow-date-foot,.ow-cal-totals,.ow-week-day,.ow-day-agenda-head,.ow-geo-ranking-row,.ow-geo-ranking-head>div,.ow-geo-site,.ow-geo-record,.ow-geo-detail-totals,.ow-geo-unmapped-row,#owGeoUnmapped) { border-color:var(--l); }
  :root[data-ow-theme] :is(.clickable-row:hover td,.global-result:hover) { background-color:var(--p2); }

  /* Inputs and Customers-style dropdowns: colour changes, not replacement controls. */
  :root[data-ow-theme] :is(.field,.form-group input,.form-group select,.form-group textarea,.ow-geo-controls select,.ow-date-trigger,.ow-date-head select) { background-color:var(--ow-input); border-color:var(--l); color:var(--t); }
  :root[data-ow-theme] :is(input,textarea)::placeholder { color:var(--m); }
  :root[data-ow-theme] :is(button,a,input,select,textarea,summary):focus-visible { outline-color:var(--ow-brand-focus); }
  :root[data-ow-theme] :is(input[type="checkbox"],input[type="radio"]) { accent-color:var(--o); }
  :root[data-ow-theme] .ow-select-menu { background-color:var(--p); border-color:var(--l); color:var(--t); }
  :root[data-ow-theme] .ow-select-menu>.ow-select-search { background-color:var(--ow-input); border-color:var(--l); color:var(--t); }
  :root[data-ow-theme] .ow-select-menu>.ow-select-search:focus { border-color:var(--ow-brand-focus); box-shadow:0 0 0 2px color-mix(in srgb,var(--ow-brand-line) 7%,transparent); }
  :root[data-ow-theme] .ow-select-option.is-active { background-color:var(--ow-brand-tint); }
  :root[data-ow-theme] :is(.ow-select-option[aria-selected="true"],.ow-select-tick) { color:var(--o); }
  :root[data-ow-theme] .ow-select-empty { color:var(--m); }
  :root[data-ow-theme] #owDatePopover .ow-select-trigger { background-color:var(--p2); border-color:var(--l); color:var(--t); }
  :root[data-ow-theme] :is(.ow-register-menu,.ow-profile-menu,.ow-reminder-menu) { background-color:var(--p); border-color:var(--l); color:var(--t); }
  :root[data-ow-theme] :is(.ow-register-menu,.ow-profile-menu,.ow-reminder-menu)>.btn:is(:hover,:focus-visible) { background-color:var(--ow-brand-tint); color:var(--o); }
  :root[data-ow-theme] :is(.ow-register-menu,.ow-profile-menu,.ow-reminder-menu)>.btn>svg { color:var(--m); }

  /* Actions: accessible dark ink on the selected orange, in both appearances. */
  :root[data-ow-theme] :is(.btn,.ow-sidebar-toggle,.ow-cal-today,.ow-cal-arrow,.ow-date-head>button,.ow-form-categories button,.ow-geo-map-toolbar button,.ow-geo-bottom button,.ow-geo-ranking-head button,.ow-geo-directions a,.ow-dash-queue-item,.ow-day-job) { background-color:var(--p); border-color:var(--l); color:var(--t); }
  :root[data-ow-theme="dark"] :is(.btn,.ow-sidebar-toggle,.ow-cal-today,.ow-cal-arrow,.ow-date-head>button,.ow-form-categories button,.ow-geo-map-toolbar button,.ow-geo-bottom button,.ow-geo-ranking-head button,.ow-geo-directions a,.ow-dash-queue-item,.ow-day-job) { background-color:var(--p2); }
  :root[data-ow-theme] :is(.btn,.ow-form-card,.ow-form-categories button,.ow-dash-queue-item,.ow-day-job):hover { background-color:var(--p2); border-color:var(--ow-brand-focus); }
  :root[data-ow-theme] :is(.btn.primary,.ow-cal-switch button.active,.ow-date-grid button.selected,.ow-time-apply),:root[data-ow-theme] #owDatePopover .ow-date-apply { background-color:var(--ow-brand-action); border-color:var(--ow-brand-action); color:var(--ow-brand-action-ink); }
  :root[data-ow-theme] :is(.btn.primary:hover,.ow-time-apply:hover),:root[data-ow-theme] #owDatePopover .ow-date-apply:hover { background-color:var(--ow-brand-action-hover); border-color:var(--ow-brand-action-hover); }
  :root[data-ow-theme] :is(.ow-dash-panel-head>button,.ow-dash-today>button,.ow-dash-status button,.ow-dash-renewals>button>b,.ow-dash-queue-item>span:last-child,.ow-geo-back,.ow-geo-site>button,.ow-geo-unmapped-row button,.ow-form-context button,.ow-date-foot button,.ow-calendar-more,.profile-link,.ow-form-card:hover .ow-form-name,.ow-day-job>span:last-child,.ow-calendar-count,.cc-big) { color:var(--o); }
  :root[data-ow-theme] .ow-dash-row:hover>span { color:var(--o); }
  :root[data-ow-theme] :is(.ow-form-categories button[aria-pressed="true"],.ow-geo-ranking-head button[aria-pressed="true"],.ow-form-steps button[aria-selected="true"]>span,.month.selected) { background-color:var(--ow-brand-tint); color:var(--o); border-color:var(--ow-brand-focus); }
  :root[data-ow-theme] .ow-form-steps button[aria-selected="true"] { color:var(--o); border-bottom-color:var(--ow-brand-line); }
  :root[data-ow-theme] .ow-form-steps button:hover { color:var(--o); }
  :root[data-ow-theme] .ow-signature-modes { background-color:var(--p2); border-color:var(--l); }
  :root[data-ow-theme] .ow-signature-modes button { color:var(--m); }
  :root[data-ow-theme] .ow-signature-modes button[aria-pressed="true"] { background-color:var(--ow-brand-tint); color:var(--o); }
  :root[data-ow-theme] #esignModal .ow-signature-modes button[aria-pressed="true"] { background-color:var(--ow-brand-tint); color:var(--o); }
  :root[data-ow-theme] .ow-appearance-options label:has(input:checked) { background-color:var(--ow-brand-tint); }
  :root[data-ow-theme] .ow-appearance-preview { background-color:#f3f5f6; border-color:#dce2e6; }
  :root[data-ow-theme] .ow-appearance-preview i { background-color:#27353e; }
  :root[data-ow-theme] .ow-appearance-preview b { background-color:#ffffff; border-color:#dce2e6; }
  :root[data-ow-theme] .ow-preview-dark { background-color:#151d22; border-color:#40515e; }
  :root[data-ow-theme] .ow-preview-dark i { background-color:#1b272f; }
  :root[data-ow-theme] .ow-preview-dark b { background-color:#293640; border-color:#40515e; }
  :root[data-ow-theme] input[type="file"]:hover::file-selector-button { background-color:var(--ow-brand-tint); }

  /* Calendar selection/today colours only; event type/status colours are retained. */
  :root[data-ow-theme] :is(.cal-day,.cal-day.ow-weekend,.ow-cal-view-month .cal-day,.ow-week-day) { background-color:var(--p); border-color:var(--l); }
  :root[data-ow-theme] :is(.cal-day.outside,.ow-cal-view-month .cal-day.outside) { background-color:var(--bg); }
  :root[data-ow-theme] :is(.ow-cal-view-month .cal-day.ow-today,.ow-week-today) { background-color:var(--ow-brand-tint); }
  :root[data-ow-theme] :is(.ow-today .cal-num,.ow-cal-view-month .ow-today .cal-num) { background-color:var(--ow-brand-action); color:var(--ow-brand-action-ink); }
  :root[data-ow-theme] .ow-calendar-summary { background-color:var(--p); color:var(--m); }
  :root[data-ow-theme] .ow-calendar-day-trigger:hover .cal-num { box-shadow:0 0 0 2px var(--ow-brand-focus); }
  :root[data-ow-theme] .ow-date-grid button:hover { background-color:var(--ow-brand-tint); }
  :root[data-ow-theme] .ow-date-grid button.selected { background-color:var(--ow-brand-action); color:var(--ow-brand-action-ink); }

  /* Green still means success, never a generic brand accent. */
  :root[data-ow-theme] .ow-dash-row>strong.ow-dash-alert { color:#be565b; }
  :root[data-ow-theme="dark"] .ow-dash-row>strong.ow-dash-alert { color:#f29ba4; }
  :root[data-ow-theme] :is(.ow-job-signature-status.is-signed,.ow-agreement-signature-status.is-signed),:root[data-ow-theme] #v15FormModal .ow-signature-status.is-signed { color:var(--ow-brand-success); }
  :root[data-ow-theme] #esignModal .ow-agreement-signature-status.is-signed { color:var(--ow-brand-success); }
  :root[data-ow-theme] .ow-team-state.is-active { color:var(--ow-brand-success); background-color:var(--ow-brand-success-bg); border-color:var(--ow-brand-success-line); }
  :root[data-ow-theme] #owFormSaveStatus { color:var(--ow-brand-success); }
  /* Restore danger treatments after generic button colours. */
  :root[data-ow-theme] #owAppDialog #owAppDialogAccept { background-color:var(--ow-brand-action); border-color:var(--ow-brand-action); color:var(--ow-brand-action-ink); }
  :root[data-ow-theme] #owAppDialog #owAppDialogAccept:hover { background-color:var(--ow-brand-action-hover); border-color:var(--ow-brand-action-hover); }
  :root[data-ow-theme] .btn.danger { color:#ae3541; border-color:#e7ccd0; }
  :root[data-ow-theme] .btn.danger:hover { background-color:#fdf0f2; border-color:#e7ccd0; }
  :root[data-ow-theme] .ow-profile-menu>.btn.danger:hover { color:#ae3541; }
  :root[data-ow-theme="dark"] .ow-profile-menu>.btn.danger:hover { color:#f29ba4; }
  :root[data-ow-theme="dark"] .btn.danger { color:#f29ba4; border-color:var(--l); }
  :root[data-ow-theme="dark"] .btn.danger:hover { background-color:#402b38; border-color:var(--l); }
  :root[data-ow-theme] #owAppDialog[data-tone="danger"] #owAppDialogAccept { background-color:#b63c48; border-color:#b63c48; color:#ffffff; }
  :root[data-ow-theme] #owAppDialog[data-tone="danger"] #owAppDialogAccept:hover { background-color:#9e303c; border-color:#9e303c; }
  :root[data-ow-theme="dark"] #owAppDialog[data-tone="danger"] #owAppDialogAccept { background-color:#a73846; border-color:#cf6572; color:#ffffff; }
  :root[data-ow-theme="dark"] #owAppDialog[data-tone="danger"] #owAppDialogAccept:hover { background-color:#922f3c; border-color:#cf6572; }
  :root[data-ow-theme] ::selection { background-color:var(--ow-brand-tint); color:var(--t); }
}
