/* AudiVita: CentralZap reference palette. Isolated from the blue Audioclean operation. */
html[data-operation-theme="audivita"],
html[data-operation-theme="audivita"] .dark {
  color-scheme: light !important;
  --av-canvas-rgb: 245 242 249;
  --av-surface-rgb: 255 255 255;
  --av-surface-soft-rgb: 249 247 252;
  --av-text-rgb: 42 29 62;
  --av-muted-rgb: 106 93 119;
  --av-border-rgb: 219 210 230;
  --av-primary-rgb: 124 58 237;
  --av-primary-text-rgb: 109 40 217;
  --av-on-action-rgb: 255 255 255;
  --av-success-rgb: 20 122 75;
  --av-success-soft-rgb: 234 247 240;
  --av-warning-rgb: 151 99 9;
  --av-warning-soft-rgb: 255 247 226;
  --av-danger-rgb: 190 40 64;
  --av-danger-soft-rgb: 255 239 242;
  --av-shadow-rgb: 28 17 43;
  --av-overlay-rgb: 23 16 35;
  --av-primary: #7c3aed;
  --av-accent: #6d28d9;
  --av-accent-soft: #f3eafa;
  --av-surface: #fff;
  --av-surface-raised: #f9f7fc;
  --av-border: #dbd2e6;
  --background: 266 37% 96% !important;
  --foreground: 264 36% 18% !important;
  --card: 0 0% 100% !important;
  --card-foreground: 264 36% 18% !important;
  --popover: 0 0% 100% !important;
  --popover-foreground: 264 36% 18% !important;
  --primary: 262 83% 58% !important;
  --primary-foreground: 0 0% 100% !important;
  --secondary: 270 24% 94% !important;
  --secondary-foreground: 271 30% 24% !important;
  --muted: 270 24% 95% !important;
  --muted-foreground: 270 12% 42% !important;
  --accent: 270 60% 95% !important;
  --accent-foreground: 262 69% 50% !important;
  --border: 267 29% 86% !important;
  --input: 267 29% 86% !important;
  --ring: 258 90% 66% !important;
  --destructive: 350 65% 45% !important;
  --destructive-foreground: 0 0% 100% !important;
  --sidebar-background: 263 37% 11% !important;
  --sidebar-foreground: 210 26% 88% !important;
  --sidebar-primary: 262 83% 58% !important;
  --sidebar-primary-foreground: 0 0% 100% !important;
  --sidebar-accent: 264 39% 17% !important;
  --sidebar-accent-foreground: 0 0% 100% !important;
  --sidebar-border: 267 28% 23% !important;
  --sidebar-ring: 258 90% 66% !important;
  --direto-blue: #7c3aed !important;
  --direto-cyan: #6d28d9 !important;
  --direto-bg: #f5f2f9 !important;
  --direto-panel: #fff !important;
  --direto-panel-strong: #f9f7fc !important;
  --direto-border: #dbd2e6 !important;
  --stage-bg: #f5f2f9 !important;
  --stage-panel: #fff !important;
  --stage-panel-soft: #f9f7fc !important;
  --stage-blue: #7c3aed !important;
  --stage-lime: #7c3aed !important;
  --stage-teal: #6d28d9 !important;
  background: #f5f2f9 !important;
}
html[data-operation-theme="audivita"] body,
html[data-operation-theme="audivita"] #root {
  background: #f5f2f9 !important;
  color: #2a1d3e !important;
}
html[data-operation-theme="audivita"] main {
  background: radial-gradient(ellipse at 95% 0%,rgba(139,92,246,.063),transparent 40%),#f5f2f9 !important;
  color: #2a1d3e;
}
html[data-operation-theme="audivita"] #root>div>:not(aside)>header {
  --sidebar-accent: 270 60% 95% !important;
  --sidebar-foreground: 264 36% 18% !important;
  --sidebar-border: 267 29% 86% !important;
  background:#f9f7fc !important;
  color:#2a1d3e !important;
}
html[data-operation-theme="audivita"] .dsp-top-scroll,
html[data-operation-theme="audivita"] .dsp-board,
html[data-operation-theme="audivita"] .dsp-column-list { scrollbar-color:#a78bfa #e9e3f1 !important; }
html[data-operation-theme="audivita"] :is(.dsp-top-scroll,.dsp-board,.dsp-column-list)::-webkit-scrollbar-track { background:#e9e3f1 !important; }
html[data-operation-theme="audivita"] :is(.dsp-top-scroll,.dsp-board,.dsp-column-list)::-webkit-scrollbar-thumb { background:#a78bfa !important; }
html[data-operation-theme="audivita"] ::selection { background: #7c3aed; color: #fff; }
html[data-operation-theme="audivita"] :focus-visible { outline-color: #8b5cf6; }
html[data-operation-theme="audivita"] input,
html[data-operation-theme="audivita"] select,
html[data-operation-theme="audivita"] textarea { color-scheme: light; accent-color: #7c3aed; }
/* Inherited paint tokens let legacy sidebar rules stay dark, without recoloring content. */
html[data-operation-theme="audivita"] :is(aside,[data-sidebar="sidebar"],#direto-login-brand) {
  --av-canvas-rgb: 19 15 32;
  --av-surface-rgb: 33 20 51;
  --av-surface-soft-rgb: 38 26 59;
  --av-text-rgb: 215 224 233;
  --av-muted-rgb: 169 189 201;
  --av-border-rgb: 102 71 138;
  --av-primary-text-rgb: 196 181 253;
  color-scheme: dark;
  background: radial-gradient(ellipse at 0 0,rgba(124,58,237,.19),transparent 38%),linear-gradient(#211433,#130f20) !important;
  color: #d7e0e9 !important;
  border-color: rgba(102,71,138,.25) !important;
}
html[data-operation-theme="audivita"] aside [data-direto-sidebar-shell],
html[data-operation-theme="audivita"] aside #direto-simple-sidebar {
  background: transparent !important; border-color: transparent !important; box-shadow: none !important;
}
html[data-operation-theme="audivita"] body #direto-simple-sidebar .direto-simple-nav-link,
html[data-operation-theme="audivita"] body #direto-simple-sidebar summary {
  background: transparent !important; border-color: transparent !important; color: #a9bdc9 !important;
  border-radius: 10px !important; box-shadow: none !important;
}
html[data-operation-theme="audivita"] body #direto-simple-sidebar .direto-simple-nav-link:hover,
html[data-operation-theme="audivita"] body #direto-simple-sidebar summary:hover {
  background: rgba(139,92,246,.12) !important; color: #fff !important;
}
html[data-operation-theme="audivita"] body #direto-simple-sidebar .direto-simple-nav-link[data-active],
html[data-operation-theme="audivita"] body #direto-simple-sidebar summary[data-active] {
  background: linear-gradient(135deg,#7c3aed,#5b21b6) !important; color: #fff !important;
  border-color: transparent !important; box-shadow: 0 4px 12px rgba(91,33,182,.16) !important;
}
html[data-operation-theme="audivita"] body #direto-simple-sidebar [data-active] :is(span,svg),
html[data-operation-theme="audivita"] body #direto-simple-sidebar .direto-simple-nav-text { color: inherit !important; }
html[data-operation-theme="audivita"] body #direto-simple-sidebar .direto-simple-nav-link:before { display:none !important; }
html[data-operation-theme="audivita"] aside :is(input,select) { color-scheme:dark; }
html[data-operation-theme="audivita"] :is(.dlr-original-mark,.dlr-login-submit,.logo,.login-mark,.login-card button) {
  background: linear-gradient(135deg,#7c3aed,#5b21b6) !important; color: #fff !important; border-color: #7c3aed !important;
}
html[data-operation-theme="audivita"] :is(.dlr-login-submit,.login-card button) * { color:#fff !important; }
html[data-operation-theme="audivita"] :is(button,a).text-primary-foreground {
  background:linear-gradient(135deg,#7c3aed,#5b21b6) !important;
  border-color:#7c3aed !important;
  color:#fff !important;
}
html[data-operation-theme="audivita"] :is(button,a).text-primary-foreground * { color:inherit !important; }
html[data-operation-theme="audivita"] :is(.dct-primary,.dsp-save-order,[data-dsp-action="save-notes"],.direto-plan-add button[type="submit"],[data-indicators-refresh]) {
  background:linear-gradient(135deg,#7c3aed,#5b21b6) !important;
  border-color:#7c3aed !important;
  color:#fff !important;
}
html[data-operation-theme="audivita"] .dlr-brand-kicker { color:#c4b5fd !important; }
html[data-operation-theme="audivita"] :is(.direto-ind-kicker,.direto-config-eyebrow) { color:#6d28d9 !important; }
/* White working surfaces and quiet lilac borders match the reference's hierarchy. */
html[data-operation-theme="audivita"] :is(.dsp-card,.dsp-modal,.dsp-detail-modal) {
  background: #fff !important; border-color: #dbd2e6 !important; color: #2a1d3e !important;
  box-shadow: 0 1px 3px rgba(28,17,43,.05),0 6px 16px rgba(28,17,43,.035);
}
html[data-operation-theme="audivita"] .dsp-column { background:#efedf5 !important; border-color:#d8d0e3 !important; }
html[data-operation-theme="audivita"] .dsp-column>header { background:#f9f7fc !important; }
html[data-operation-theme="audivita"] .dsp-detail-modal .dsp-address-card:not(.dsp-address-editor) {
  background: #f9f7fc !important; border-color: #dbd2e6 !important; box-shadow: none !important;
}
html[data-operation-theme="audivita"] .dsp-detail-modal .dsp-address-copy-field:not(.is-copied) {
  background: #fff; border-color: #e3dee8;
}
html[data-operation-theme="audivita"] .dsp-detail-modal .dsp-address-copy-field small { color:#6a5d77 !important; }
html[data-operation-theme="audivita"] .dsp-detail-modal .dsp-address-copy-field:not(.is-copied):is(:hover,:focus-visible) {
  background: #f3eafa; border-color: #a78bfa;
}
html[data-operation-theme="audivita"] .dsp-card .dsp-card-check.is-checked,
html[data-operation-theme="audivita"] .dsp-mark-delivered-icon { background:#168452 !important; color:#fff !important; }

/* Metric custom properties were designed for dark cards: use readable light-theme inks. */
html[data-operation-theme="audivita"] body.direto-sales-workspace [data-direto-sales-kpis] > .direto-sales-metric { --sales-kpi:var(--metric) !important; }
html[data-operation-theme="audivita"] body.dct-route {
  --dct-mint:#147a4b !important;
  --dct-amber:#976309 !important;
  --dct-rose:#be2840 !important;
  --dct-cyan:#6d28d9 !important;
}
html[data-operation-theme="audivita"] .direto-sales-metric[data-tone="mint"] { --metric:#147a4b !important; }
html[data-operation-theme="audivita"] .direto-sales-metric:is([data-tone="amber"],[data-tone="gold"]) { --metric:#976309 !important; }
html[data-operation-theme="audivita"] .direto-sales-metric:is([data-tone="rose"],[data-tone="pink"]) { --metric:#be2840 !important; }
html[data-operation-theme="audivita"] .direto-sales-metric[data-tone="cyan"] { --metric:#6d28d9 !important; }
html[data-operation-theme="audivita"] .direto-sales-metric[data-tone="slate"] { --metric:#6a5d77 !important; }
