/* v0.78-r6.10 — common, palette-aware surfaces, neutral text and semantic status colours. */
:root{
 --ink:#25282d;--muted:#626b75;--white:#fff;--surface:var(--white);--panel:var(--white);
 --bg:color-mix(in srgb,var(--accent-soft) 45%,#f7f8fa);
 --line:color-mix(in srgb,var(--accent) 14%,#e5e8ec);
 --field:color-mix(in srgb,var(--accent-soft) 46%,#fafbfc);
 --ui-soft:color-mix(in srgb,var(--accent-soft) 55%,var(--white));
 --ui-side-text:color-mix(in srgb,var(--accent) 13%,#e0e3e8);
 --ui-side-muted:color-mix(in srgb,var(--accent) 20%,#c7ccd5);
 --ui-side-line:color-mix(in srgb,var(--accent) 32%,transparent);
 --ui-shadow-color:color-mix(in srgb,var(--accent-strong) 9%,transparent);
 --ui-focus-ring:color-mix(in srgb,var(--accent) 27%,transparent);
 --ui-toast:var(--accent-sidebar);--shadow:0 10px 35px var(--ui-shadow-color);
 --dark:var(--accent-strong);--darker:var(--accent-sidebar);
 accent-color:var(--accent);
}
:root[data-theme="dark"]{
 --ink:#f0f1f4;--muted:#b9bec8;--white:#191a1e;
 --bg:color-mix(in srgb,var(--accent-soft) 24%,#111216);
 --line:color-mix(in srgb,var(--accent-soft) 45%,#373a40);
 --field:color-mix(in srgb,var(--accent-soft) 34%,#24262b);
 --ui-soft:color-mix(in srgb,var(--accent-soft) 55%,var(--white));
 --ui-shadow-color:#0004;--ui-toast:#35373e;
 --ws-surface:var(--white);--ws-border:var(--line);
}
:root[data-theme="dark"][data-palette="institutional"]{--accent-sidebar:#172119;--accent-hover:#2b3e2a}
:root[data-theme="dark"][data-palette="blue"]{--accent-sidebar:#152c46;--accent-hover:#294969}
:root[data-theme="dark"][data-palette="orange"]{--accent-sidebar:#39281d;--accent-hover:#633c25}
:root[data-theme="dark"][data-palette="graphite"]{--accent-sidebar:#242b36;--accent-hover:#404b5e}
:root[data-theme="dark"][data-palette="purple"]{--accent-sidebar:#30233f;--accent-hover:#50396c}
/* Neutral text and consistent selected navigation, including dark mode. */
:root #appShell .sidebar{background:var(--accent-sidebar);color:var(--ui-side-text)}
:root #appShell .sidebar :is(.nav-item,.nav-ico,.exit,.sidebar-bottom,.system-title){color:var(--ui-side-text)}
:root #appShell .sidebar :is(.side-label,.sidebar-bottom small,.system-version,.brand-word small){color:var(--ui-side-muted)}
:root #appShell .sidebar :is(.nav-item.active,.nav-item:hover){background:var(--accent-hover)!important;color:#fff}
:root #appShell .sidebar .nav-item b:not([hidden]){color:var(--ui-side-text)}
:root #appShell .sidebar-bottom{border-color:var(--ui-side-line)}
/* Inputs inherit the chosen hue even in administrative modules and floating modals. */
:root :is(.app,#modalRoot,.office-chat,.login,.mascot-settings) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]),select,textarea){background-color:var(--field);border-color:var(--line);color:var(--ink)}
:root :is(input,textarea)::placeholder{color:var(--muted);opacity:.85}
:root :is(input,select,textarea):focus{outline-color:var(--accent);border-color:var(--accent)}
:root :is(input[type=checkbox],input[type=radio],progress){accent-color:var(--accent)}
:root :is(.search,.global-search-form,.team-task-search,.wf-lookup-results){background-color:var(--field);border-color:var(--line);color:var(--ink)}
:root .global-search-form:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--ui-focus-ring)}
:root :is(.btn.linkish,.table-btn,.muted-link,.msg-icon){color:var(--accent-strong)}
:root :is(.btn.primary,.cnj-actions [data-cnj="task"]){background:var(--accent-strong);border-color:var(--accent-strong);color:var(--accent-on)}
:root :is(.btn.primary,.cnj-actions [data-cnj="task"]):hover{background:var(--accent-strong);border-color:var(--accent-strong);color:var(--accent-on)}
:root .gs-filters .btn[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-strong)}
:root .notice.ui-info,:root .ws-inline .notice:not([role=alert]){background:var(--ui-soft)!important;border-color:var(--line)!important;color:var(--ink)!important}
:root .notice.ui-info b,:root .ws-inline .notice:not([role=alert]) b{color:var(--ink)}
:root .online-dot{background:#8fc9a7;box-shadow:0 0 0 4px color-mix(in srgb,#8fc9a7 22%,transparent)}
:root .pill.green{color:var(--green)}
/* Preserve status colours; green online/success, red failure and amber warning are not decorative. */

/* r6.18: dark mode is achromatic, independently of the saved light palette. */
:root[data-theme="dark"][data-palette],:root[data-theme="dark"]{
 color-scheme:dark;
 --bg:#080808;--white:#181818;--surface:#181818;--panel:#181818;
 --ink:#eeeeee;--muted:#b0b0b0;--line:#3a3a3a;--field:#242424;
 --accent:#b9b9b9;--accent-strong:#dedede;--accent-soft:#303030;
 --accent-sidebar:#101010;--accent-hover:#303030;--accent-on:#141414;
 --dark:#181818;--darker:#101010;--gold:#b9b9b9;--goldlight:#292929;
 --ui-soft:#252525;--ui-side-text:#e0e0e0;--ui-side-muted:#b5b5b5;
 --ui-side-line:#383838;--ui-shadow-color:#0006;--ui-focus-ring:#b9b9b944;
 --ui-toast:#353535;--shadow:0 10px 35px #0006;
 --ws-surface:#181818;--ws-border:#3a3a3a;
 accent-color:var(--accent);
}
:root[data-theme="dark"] #appShell .sidebar{background:#101010}
:root[data-theme="dark"] #appShell .sidebar :is(.nav-item.active,.nav-item:hover){background:#303030!important;color:#fff}
:root[data-theme="dark"] .topbar{background:#141414}
:root[data-theme="dark"] :is(.notice:not([role=alert]),.banner-demo,.btn.soft){background:#292929!important;border-color:#454545!important;color:#dedede!important}
:root[data-theme="dark"] :is(.avatar:not(.has-photo),.staff-avatar,.account-preview,.integration-icon){background:var(--field);color:var(--ink)}
:root[data-theme="dark"] .office-chat{box-shadow:0 16px 48px #0006}
