
/* SRD OS Wasstraat | One authoritative color-scheme contract | 2026-10-16.
   Brand colors are immutable. Changing scheme only remaps semantic surfaces.
   Keep this the LAST sheet in the existing global-theme hook. */
:root {
  --srd-brand-night:#030C17;
  --srd-brand-navy:#0A2036;
  --srd-brand-silver:#D5DDE5;
  --srd-brand-titanium:#738494;
  --srd-brand-gold:#B89B68;
  --srd-brand-blue:#168EFF;
  --srd-brand-paper:#F2F5F7;
  --srd-brand-ink:#132638;
}



/* Preserve the existing legacy CSS API; map it exactly once per scheme. */
html[data-srd-scheme] {
  --srd-bg:var(--wash-page)!important;
  --srd-panel:var(--wash-panel)!important;
  --srd-panel-alt:var(--wash-raised)!important;
  --srd-text:var(--wash-text)!important;
  --srd-muted:var(--wash-muted)!important;
  --srd-line:var(--wash-border)!important;
  --srd-accent:var(--wash-accent)!important;
  --cr-bg:var(--wash-page)!important;
  --cr-panel:var(--wash-panel)!important;
  --cr-panel2:var(--wash-raised)!important;
  --cr-text:var(--wash-text)!important;
  --cr-muted:var(--wash-muted)!important;
  --cr-line:var(--wash-border)!important;
}
html[data-srd-scheme] body.srd-os-workspace {
  --dash-bg:var(--wash-page); --dash-sidebar:var(--wash-panel);
  --dash-top:var(--wash-panel); --dash-card:var(--wash-panel);
  --dash-card-hover:var(--wash-raised); --dash-text:var(--wash-text);
  --dash-muted:var(--wash-muted); --dash-border:var(--wash-border);
  --dash-divider:var(--wash-border); --dash-action:var(--wash-link);
  --dash-gold:var(--wash-accent); --dash-icon:var(--wash-text);
  --dash-input:var(--wash-input);
}
html[data-srd-scheme] body.srd-frontdoor-body,
html[data-srd-scheme] body.srd-os-workspace {
  background:var(--wash-page)!important; color:var(--wash-text)!important;
}
/* Workfield surfaces: paper for Light; elevated navy/charcoal for dark palettes.
   Named components are the surface mapping, NOT arbitrary tags/page inheritance. */
html[data-srd-scheme] :is(
  .cr-live-panel,.srd-frontdoor-card:not(.srd-frontdoor-card--login),
  .tr-edit-section,.tr-collapsible,.tr-import-box,.tr-invoice-list,
  .srd-access-user,.srd-users-register,.srd-user-card,
  .srd-preferences-panel,.srd-settings-card,
  .srd-k06-machine-card,.srd-k06-machine-field,.srd-k06-ohc-card
) {background:var(--wash-panel)!important;color:var(--wash-text)!important;border-color:var(--wash-border)!important}
html[data-srd-scheme] :is(
  .cr-live-panel,.tr-edit-section,.tr-collapsible,.tr-invoice-list,
  .srd-access-user,.srd-users-register,.srd-user-card,
  .srd-preferences-panel,.srd-settings-card,.srd-k06-machine-card
) :is(h1,h2,h3,h4,strong) {color:var(--wash-text)!important}
html[data-srd-scheme] :is(
  .cr-live-panel,.tr-edit-section,.tr-collapsible,.tr-invoice-list,
  .srd-access-user,.srd-users-register,.srd-user-card,
  .srd-preferences-panel,.srd-settings-card,.srd-k06-machine-card
) :is(p,small) {color:var(--wash-muted)}
/* Semantic status surfaces: identical construction, palette-selected paint. */
html[data-srd-scheme] :is(
  .srd-access-pulse article,.srd-settings-intro,.srd-tenant-head,
  .srd-dossier-summary article,.srd-workshop-group>summary,.ohc-sales-hero
) {background:var(--wash-status-surface)!important;color:var(--wash-status-text)!important;border-color:var(--wash-border)!important}
html[data-srd-scheme] :is(
  .srd-access-pulse article,.srd-settings-intro,.srd-tenant-head,
  .srd-dossier-summary article,.srd-workshop-group>summary,.ohc-sales-hero
) :is(h1,h2,h3,h4,strong) {color:var(--wash-status-text)!important}
html[data-srd-scheme] :is(
  .srd-access-pulse article,.srd-settings-intro,.srd-tenant-head,
  .srd-dossier-summary article,.srd-workshop-group>summary,.ohc-sales-hero
) :is(p,small) {color:var(--wash-status-muted)!important}
/* Data grids only. Do not recolor EVERY table in SRD OS or status indicators. */
html[data-srd-scheme] :is(.tr-table,.ohc-sales-table,.srd-k06-table) {
  background:var(--wash-panel)!important;color:var(--wash-text)!important;
  border-color:var(--wash-border)!important;
}
html[data-srd-scheme] :is(.tr-table,.ohc-sales-table,.srd-k06-table) :is(thead,tbody,tr,td,th) {
  background:var(--wash-panel)!important;color:var(--wash-text)!important;
  border-color:var(--wash-border)!important;
}
html[data-srd-scheme] :is(.tr-table,.ohc-sales-table,.srd-k06-table) thead th {
  background:var(--wash-head)!important;color:var(--wash-text)!important;
}
html[data-srd-scheme] :is(.tr-table,.ohc-sales-table,.srd-k06-table) :is(td strong,td a,.ohc-relation-link,.srd-k06-machine-main strong) {
  color:var(--wash-link)!important;
}
html[data-srd-scheme] :is(.tr-table,.ohc-sales-table,.srd-k06-table) td small {
  color:var(--wash-muted)!important;
}
/* Form controls on light/paper and dark/navy workfields. */
html[data-srd-scheme] :is(.tr-edit-grid,.tr-filterbar,.srd-k06-search,.srd-preferences-panel) :is(input,select,textarea) {
  background:var(--wash-input)!important;color:var(--wash-text)!important;
  border-color:var(--wash-border)!important;
}
/* Theme picker is a palette gallery. Selection mirrors the established preferences key. */
html[data-srd-scheme] .srd-theme-options button {
  background:var(--wash-raised)!important;color:var(--wash-text)!important;
  border-color:var(--wash-border)!important;
}
html[data-srd-scheme] .srd-theme-options button[aria-pressed="true"] {
  border-color:var(--wash-accent)!important;
  box-shadow:inset 0 0 0 1px var(--wash-accent)!important;
}
.srd-theme-options [data-srd-theme-choice]::before {
  content:""; display:inline-block;vertical-align:middle;width:13px;height:13px;
  margin-right:7px;border:1px solid #738494;border-radius:50%;background:#F2F5F7;
}
.srd-theme-options [data-srd-theme-choice="navy"]::before {background:#0A2036;border-color:#B89B68}
.srd-theme-options [data-srd-theme-choice="dark"]::before {background:#030C17;border-color:#738494}
.srd-theme-options [data-srd-theme-choice="system"]::before {background:linear-gradient(90deg,#F2F5F7 50%,#030C17 50%)}
/* Structural disclosure remains independent of colors and preferences. */
[data-goods-results][hidden], [data-invoice-results][hidden] {display:none!important}


/* Semantic surface contract: real popup/QR/modal/list components (ORION 2026-10-16).
   Replaces inherited navy foreground on paper. No global table/tag override. */
html[data-srd-scheme] :is(.srd-k03-modal,.srd-k03-kvk-card,.srd-k03-summary-card,
  .srd-k03-profile-card,.srd-k03-kvk-pane,.srd-k03-modal .srd-k03-contact-detail dl>div,
  .srd-k06-dossier-card,.srd-k06-dossier-case) {
  background:var(--wash-panel)!important;
  color:var(--wash-text)!important;
  border-color:var(--wash-border)!important;
}
html[data-srd-scheme] :is(.srd-k03-modal,.srd-k03-kvk-card,.srd-k03-summary-card,
  .srd-k03-profile-card,.srd-k06-machine-shell) :is(h2,h3,h4,dd,strong):not(.srd-k03-state) {
  color:var(--wash-text)!important;
}
html[data-srd-scheme] :is(.srd-k03-modal,.srd-k03-kvk-card,.srd-k03-summary-card,
  .srd-k03-profile-card,.srd-k06-machine-shell) :is(dt,small,aside>span,.srd-k03-profile-field span) {
  color:var(--wash-muted)!important;
}
html[data-srd-scheme] .srd-k06-machine-shell .srd-k03-contact-detail dl>div{
  background:var(--wash-raised)!important;color:var(--wash-text)!important;border-color:var(--wash-border)!important;
}
html[data-srd-scheme] :is(.srd-k03-modal,.srd-k06-machine-shell) :is(.srd-k03-action-bank button,.srd-k03-action-bank a) {
  background:var(--wash-raised)!important;color:var(--wash-text)!important;border-color:var(--wash-accent)!important;
}
html[data-srd-scheme] :is(.srd-k03-modal,.srd-k06-machine-shell) :is(.srd-k03-action-bank button,.srd-k03-action-bank a).is-active {
  background:var(--wash-head)!important;color:var(--wash-text)!important;
}
html[data-srd-scheme] .srd-k06-machine-shell>header>a,
html[data-srd-scheme] .srd-k03-modal>header>a {
  color:var(--wash-text)!important;border-color:var(--wash-accent)!important;
}
html[data-srd-scheme] .srd-k06-machine-shell aside>.srd-k06-qr,
html[data-srd-scheme] .srd-k06-edit-contact-shell .srd-k06-qr,
html[data-srd-scheme] .srd-k06-machine-edit-detail .srd-k06-qr {
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:9px;
  width:100%;box-sizing:border-box;padding:12px;border:1px solid var(--wash-border)!important;
  border-radius:12px;background:#fff!important;color:#132638!important;
}
html[data-srd-scheme] .srd-k06-machine-shell .srd-k06-qr .srd-k06-qr-serial{font-size:11px!important;color:#132638!important;overflow-wrap:anywhere}
html[data-srd-scheme] .srd-k06-print-btn{
  min-height:42px;min-width:110px;padding:9px 12px;border:1px solid #A47D41;
  border-radius:9px;background:#F2F5F7;color:#132638;cursor:pointer;font:750 12px system-ui,sans-serif;
}
html[data-srd-scheme] .srd-k06-print-btn:hover{background:#E4EBF1}
html[data-srd-scheme] :is(.srd-k03-modal,.srd-k03-kvk-card) :is(input,textarea,select){
  background:var(--wash-input)!important;color:var(--wash-text)!important;
  border-color:var(--wash-border)!important;
}
html[data-srd-scheme] .srd-k03-modal .srd-k03-photo{border-color:var(--wash-border)!important}
html[data-srd-scheme] .srd-relations-shell .srd-k03-search-zone{flex-wrap:wrap;gap:12px}
html[data-srd-scheme] .srd-relations-shell .srd-k03-search-note{
  max-width:100%;line-height:1.55;color:var(--wash-muted)!important;
}
html[data-srd-scheme] .srd-relations-shell .srd-k03-table-wrap{
  background:var(--wash-panel)!important;border-color:var(--wash-border)!important;
}
html[data-srd-scheme] .srd-relations-shell .srd-k03-table :is(td,td strong){
  color:var(--wash-text)!important;
}
html[data-srd-scheme] .srd-relations-shell .srd-k03-table thead th{
  background:var(--wash-head)!important;color:var(--wash-text)!important;
}
html[data-srd-scheme] .srd-relations-shell .srd-k03-table td small{color:var(--wash-muted)!important}
html[data-srd-scheme="light"] .srd-relations-shell .srd-k03-table tbody tr{
  background:var(--wash-panel)!important;
}
html[data-srd-scheme="light"] .srd-relations-shell .srd-k03-table tbody tr:nth-child(even){
  background:var(--wash-raised)!important;
}
@media(max-width:720px){html[data-srd-scheme] .srd-k06-machine-shell aside>.srd-k06-qr{flex-direction:column}}

/* =============================================================
   SRD WASSTRAAT | ONE permanent legacy-surface adapter, v2
   Existing legacy markup chooses a surface role only here.
   Theme values ALWAYS come from srd-palette-<name>.css.
   New palettes do not change this adapter or page-specific CSS.
   ============================================================= */
/* Worklist/details = FIELD surface, never inherit from page or navy headers. */
html[data-srd-scheme] :is(
  .srd-dossier-card,.srd-dossier-card>summary,
  .ar-card,.ar-fact,.ar-rights,.ar-grant
) {
  background:var(--wash-field)!important;
  color:var(--wash-field-text)!important;
  border-color:var(--wash-border)!important;
}
html[data-srd-scheme] :is(
  .srd-dossier-card .srd-dossier-cell strong,
  .srd-dossier-card .srd-dossier-cell a,
  .srd-dossier-card .srd-dossier-cell a strong,
  .ar-card h2,.ar-fact strong,.ar-fact code,
  .ar-activation strong,.ar-grant,
  .ar-rights strong,.ar-rights b
) {color:var(--wash-field-text)!important}
html[data-srd-scheme] :is(
  .srd-dossier-card .srd-dossier-cell span,
  .srd-dossier-card .srd-dossier-cell small,
  .ar-card .ar-meta,.ar-fact span,.ar-fact-sub,
  .ar-rights span,.ar-wagon-check small
) {color:var(--wash-field-muted)!important}
html[data-srd-scheme] .srd-dossier-card[open]>summary {
  background:var(--wash-raised)!important;
  border-bottom-color:var(--wash-border)!important;
}
html[data-srd-scheme] :is(.ar-card,.ar-rights) :is(.ar-wagon-check,.ar-connect-help) {
  color:var(--wash-field-text)!important;
}
html[data-srd-scheme] :is(.ar-law,.ar-flash) {
  background:var(--wash-status-surface)!important;
  color:var(--wash-status-text)!important;
  border-color:var(--wash-border)!important;
}
html[data-srd-scheme] .ar-connect>summary {
  background:var(--wash-raised)!important;
  color:var(--wash-field-text)!important;
  border-color:var(--wash-accent)!important;
}
html[data-srd-scheme] :is(.ar-actions button,.ar-actions summary,.ar-preview-btn) {
  background:var(--wash-raised)!important;
  color:var(--wash-field-text)!important;
  border-color:var(--wash-accent)!important;
}
html[data-srd-scheme] .ar-connect button:not(input) {
  background:var(--wash-accent)!important;
  color:var(--wash-accent-ink)!important;
}
html[data-srd-scheme] :is(.ar-card,.ar-fact,.ar-rights) :is(input:not([type="checkbox"]),select,textarea) {
  background:var(--wash-input)!important;
  color:var(--wash-text)!important;
  border-color:var(--wash-border)!important;
}
html[data-srd-scheme] :is(.ar-state[data-state="PAID"],.ar-state[data-state="CONNECTED"],.srd-dossier-led--GREEN) {
  color:var(--wash-positive)!important;
}
html[data-srd-scheme] :is(.ar-state[data-state="REJECTED"],.ar-state[data-state="PAYMENT_FAILED"],.srd-dossier-led--RED) {
  color:var(--wash-danger)!important;
}
html[data-srd-scheme] :is(.srd-dossier-led--YELLOW,.srd-dossier-led--ORANGE) {
  color:var(--wash-warning)!important;
}
html[data-srd-scheme] :is(.ar-card .ar-fact-pay strong,.ar-chip.wagon) {
  color:var(--wash-warning)!important;
}
html[data-srd-scheme] .ar-card :is(.ar-chip,.ar-wagon-save) {
  background:var(--wash-chip-bg)!important;
  color:var(--wash-field-text)!important;
  border-color:var(--wash-border)!important;
}
html[data-srd-scheme] :is(.ar-card,.srd-dossier-card) :focus-visible {
  outline:2px solid var(--wash-focus)!important;
  outline-offset:2px;
}
/* Explicit status/section navy remains navy in Light; its children use on-navy ink. */
html[data-srd-scheme] :is(.srd-workshop-group>summary,.srd-dossier-summary article) :is(span,small,strong) {
  color:var(--wash-status-text)!important;
}
html[data-srd-scheme] .srd-dossier-summary article>span{
  color:var(--wash-status-muted)!important;
}
