/* Shared semantic palette. Media pixels and the ERID label theme are independent. */
:root, :root[data-crm-theme="dark"] {
  color-scheme: dark;
  --crm-bg:#17223a; --crm-surface:#1c2942; --crm-raised:#24324c;
  --crm-inset:#18243c; --crm-hover:#24324c;
  --crm-text:#edf2fc; --crm-secondary:#d6dce8; --crm-muted:#aebbd1;
  --crm-border:#33435e; --crm-control-border:#607492;
  --crm-accent:#ef827a; --crm-accent-hover:#f4958e; --crm-accent-active:#e8756d;
  --crm-on-accent:#17223a; --crm-accent-text:#ffb3ae; --crm-focus:#ffb3ae;
  --crm-warning:#efc58a; --crm-success:#81d7ae; --crm-danger:#ffb3ae;
  --crm-selection-bg:rgba(239,130,122,.14);
  --crm-tint:rgba(255,255,255,.035); --crm-tint-strong:rgba(255,255,255,.07);
  --crm-overlay:rgba(7,13,25,.65); --crm-shadow:rgba(5,10,25,.5);
  --crm-glass:rgba(33,47,75,.78); --crm-switch-knob:#fff;
  --crm-chart-1:#ef827a; --crm-chart-2:#8fa3d1; --crm-chart-3:#f4b8ae;
  --crm-chart-4:#748dc5; --crm-chart-5:#c9d1e2; --crm-chart-other:#7385a7;
  --crm-heat-rgb:236,111,106; --crm-heat-blue-rgb:143,163,209;
  --crm-checker-bg:#111827; --crm-checker-tile:#ffffff07;
  --crm-radius:8px; --crm-font:Montserrat,system-ui,sans-serif;
}
:root[data-crm-theme="light"] {
  color-scheme: light;
  --crm-bg:#f3f5f8; --crm-surface:#fff; --crm-raised:#e7ecf3;
  --crm-inset:#f5f7fa; --crm-hover:#e7ecf3;
  --crm-text:#1d2b40; --crm-secondary:#34445b; --crm-muted:#526179;
  --crm-border:#ccd5e1; --crm-control-border:#8391a5;
  --crm-accent:#ef827a; --crm-accent-hover:#f4958e; --crm-accent-active:#e8756d;
  --crm-on-accent:#17223a; --crm-accent-text:#a33933; --crm-focus:#a33933;
  --crm-warning:#805000; --crm-success:#166745; --crm-danger:#a52e3b;
  --crm-selection-bg:#fbe5e2;
  --crm-tint:rgba(29,43,64,.035); --crm-tint-strong:rgba(29,43,64,.07);
  --crm-overlay:rgba(29,43,64,.32); --crm-shadow:rgba(29,43,64,.16);
  --crm-glass:rgba(255,255,255,.86);
  --crm-chart-1:#b6443e; --crm-chart-2:#41669f; --crm-chart-3:#975177;
  --crm-chart-4:#417a6c; --crm-chart-5:#7660a0; --crm-chart-other:#64748b;
  --crm-heat-rgb:210,91,82; --crm-heat-blue-rgb:65,102,159;
  --crm-checker-bg:#eef1f5; --crm-checker-tile:#1d2b400c;
}
:root {
  --o-bg:var(--crm-bg); --o-panel:var(--crm-surface); --o-border:var(--crm-border);
  --o-muted:var(--crm-muted); --o-accent:var(--crm-accent); --o-text:var(--crm-text);
}
:root[data-crm-theme="light"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),textarea,select,.ord-select-trigger,.am-filter-trigger):not([aria-invalid="true"]) { border-color:var(--crm-control-border); }
:root[data-crm-theme="light"] :is(input,textarea,select,button,summary):focus-visible { outline-color:var(--crm-focus); }
html { background:var(--crm-bg); color:var(--crm-text); }
button,input,select,textarea { accent-color:var(--crm-accent); }
input::placeholder,textarea::placeholder { color:var(--crm-muted); opacity:1; }
.crm-theme-toggle {
  --crm-theme-x:32px;
  position:relative; display:inline-block; flex:none;
  box-sizing:border-box; width:68px; min-width:68px; height:34px; min-height:34px;
  padding:0; margin:0; border:1px solid var(--crm-border); border-radius:999px;
  background:var(--crm-inset); color:var(--crm-muted); cursor:pointer;
  font:inherit; vertical-align:middle; -webkit-tap-highlight-color:transparent;
}
.crm-theme-toggle:hover { border-color:var(--crm-muted); background:var(--crm-inset); box-shadow:none; transform:none; }
.crm-theme-toggle:active { background:var(--crm-inset); transform:none; }
.crm-theme-toggle:focus-visible { outline:2px solid var(--crm-focus); outline-offset:2px; }
.crm-theme-thumb { position:absolute; left:3px; top:2px; width:28px; height:28px; border-radius:50%; background:var(--crm-accent); transform:translateX(var(--crm-theme-x)); transition:transform 180ms cubic-bezier(.2,.8,.2,1); }
.crm-theme-toggle:active .crm-theme-thumb { transform:translateX(var(--crm-theme-x)) scale(.92); }
.crm-theme-toggle .crm-theme-icon { position:absolute; top:8px; width:16px; height:16px; pointer-events:none; }
.crm-theme-sun { left:9px; }.crm-theme-moon { right:9px; }
[data-crm-theme="light"] .crm-theme-toggle { --crm-theme-x:0px; }
[data-crm-theme="light"] .crm-theme-sun,[data-crm-theme="dark"] .crm-theme-moon { color:var(--crm-on-accent); }
.crm-themed-header { position:relative; padding-inline-end:80px; }
/* Keep the pointer target stationary; only the inner thumb may transform. */
.crm-themed-header > .crm-theme-toggle { position:absolute; top:0; bottom:0; right:0; margin-block:auto; transform:none; }
.login-content > .crm-theme-toggle { position:absolute; top:28px; right:48px; box-shadow:none; }
.crm-brand,.logo { color:var(--crm-text); }
/* Preserve the original glyph drawing; its monochrome ink follows the wordmark. */
.crm-brand svg circle:first-child,.logo svg circle:first-child { stroke:currentColor; }
.crm-brand svg rect,.logo svg rect { fill:currentColor; }
[data-crm-theme="light"] .shape-a,[data-crm-theme="light"] .shape-d { border-color:rgba(29,43,64,.12); }
[data-crm-theme="light"] .shape-b,[data-crm-theme="light"] .shape-e { background:linear-gradient(135deg,rgba(29,43,64,.07),rgba(29,43,64,.015)); }
[data-crm-theme="light"] .data-line { background:rgba(29,43,64,.14); }
@media(max-width:720px) { .login-content > .crm-theme-toggle { top:20px; right:20px; } }
@media(max-width:700px),(pointer:coarse) {
  .crm-theme-toggle { min-height:44px; height:44px; }
  .crm-theme-thumb { top:7px; }.crm-theme-toggle .crm-theme-icon { top:13px; }
  .crm-themed-header { padding-inline-end:0; }
  .crm-themed-header > :first-child { box-sizing:border-box; padding-inline-end:80px; min-height:44px; }
  .crm-themed-header > .crm-theme-toggle { top:0; bottom:auto; margin-block:0; transform:none; }
  .crm-analytics-heading > .am-page-heading { padding-inline-end:0; }
  .crm-analytics-heading .am-page-heading h1 { padding-inline-end:128px; min-height:44px; }
  .crm-analytics-heading > .crm-header-notifications { position:absolute; top:0; right:80px; }
}
@media(prefers-reduced-motion:reduce) { .crm-theme-thumb { transition:none; } }
