/* Loaded after existing CRM CSS. Palette families never choose a functional workspace. */
:root[data-cv-theme]{--ink:var(--cv-ink);--teal:var(--cv-accent);--muted:var(--cv-muted);--line:var(--cv-line)}
:root[data-cv-theme] body{background-color:var(--cv-bg);color:var(--cv-ink);background-image:var(--cv-background);font-size:calc(16px * var(--cv-scale))}
:root[data-cv-theme] .card,:root[data-cv-theme] dialog{background:var(--cv-surface);color:var(--cv-ink);border-color:var(--cv-line);border-radius:var(--cv-radius)}
:root[data-cv-theme] input,:root[data-cv-theme] textarea,:root[data-cv-theme] select{background:var(--cv-surface);color:var(--cv-ink);border-color:var(--cv-line);border-radius:var(--cv-radius)}
:root[data-cv-theme] button,:root[data-cv-theme] .button{background:var(--cv-accent);color:var(--cv-on-accent);border-radius:var(--cv-radius)}
:root[data-cv-theme] aside{background:var(--cv-ink);color:var(--cv-bg)}
:root[data-cv-theme] aside nav a,:root[data-cv-theme] aside .muted{color:var(--cv-bg)}
:root[data-cv-theme] aside nav a:hover{background:var(--cv-soft);color:var(--cv-ink)}
:root[data-cv-theme] .pill,:root[data-cv-theme] .badge{background:var(--cv-soft);color:var(--cv-ink)}
:root[data-cv-theme] .grid{gap:var(--cv-panel-gap)}
:root[data-cv-theme] h1,:root[data-cv-theme] h2{font-weight:var(--cv-heading-weight)}
:root[data-cv-depth=true] .card{box-shadow:var(--cv-shadow)}
:root[data-cv-theme] .cv-theme-picker button{background:var(--cv-surface);color:var(--cv-ink);border-color:var(--cv-line);min-height:44px}
:root[data-cv-theme] .cv-theme-dialog input[type=checkbox]{display:inline-block;width:auto;margin-inline-end:8px}
:root[data-cv-theme] .cv-theme-dialog p button{margin:4px}
:root[data-cv-theme] :focus-visible{outline:3px solid var(--cv-accent);outline-offset:3px}
@media(prefers-reduced-motion:reduce){:root[data-cv-theme] *{animation:none!important;transition:none!important}}
@media print{.cv-theme-picker{display:none!important}:root[data-cv-theme] body,:root[data-cv-theme] .card{background:white!important;color:black!important;box-shadow:none!important}}
/* Legacy tables had fixed pale stripes; pair foreground/background for dark palettes. */
:root[data-cv-theme] th,:root[data-cv-theme] .data-list thead th{background:var(--cv-soft);color:var(--cv-ink);border-color:var(--cv-line)}
:root[data-cv-theme] tbody tr:nth-child(even),:root[data-cv-theme] .data-list tbody tr:nth-child(even){background:var(--cv-soft);color:var(--cv-ink)}
:root[data-cv-theme] .notice{background:#fff7e6;color:#4b350d}
:root[data-cv-theme] .error{background:#fff2f2;color:#8f1515}
:root[data-cv-theme] .success{background:#eaf8ef;color:#145c35}
:root[data-cv-theme] button.danger{background:#8f1515;color:#fff}
