/* Workspace palettes live in the external stylesheet so strict CSP preserves contrast. */
body.tenant-theme-sesame{--tenant-brand:#5b2a86;--theme-primary:#5b2a86;--theme-deep:#32104f;--theme-accent:#8e54bd;--theme-soft:#f2eafb;--navy:#32104f;--navy2:#5b2a86;--cyan:#8e54bd;--kx-navy:#32104f;--kx-orange:#8e54bd}
body.tenant-theme-city-home{--tenant-brand:#24743d;--theme-primary:#24743d;--theme-deep:#123f25;--theme-accent:#53a66b;--theme-soft:#eaf6ed;--navy:#123f25;--navy2:#24743d;--cyan:#53a66b;--kx-navy:#123f25;--kx-orange:#53a66b}
body.tenant-theme-kynex{--tenant-brand:#123651;--theme-primary:#123651;--theme-deep:#0d273d;--theme-accent:#18a7c9;--theme-soft:#e8f5f9;--navy:#0d273d;--navy2:#123651;--cyan:#18a7c9;--kx-navy:#0d273d;--kx-orange:#18a7c9}

/* Final tenant palette layer. Loaded last so legacy page styles cannot restore KYNEX blue. */
body.tenant-theme-sesame .global-sidebar,
.global-sidebar.tenant-theme-sesame { background: linear-gradient(180deg, #5b2a86, #32104f); }
body.tenant-theme-city-home .global-sidebar,
.global-sidebar.tenant-theme-city-home { background: linear-gradient(180deg, #24743d, #123f25); }
body.tenant-theme-kynex .global-sidebar,
.global-sidebar.tenant-theme-kynex { background: linear-gradient(180deg, #123651, #0d273d); }

body.tenant-theme-sesame .hero { background: linear-gradient(112deg, #32104f, #5b2a86); }
body.tenant-theme-city-home .hero { background: linear-gradient(112deg, #123f25, #24743d); }
body.tenant-theme-kynex .hero { background: linear-gradient(112deg, #0d273d, #123651); }

body.tenant-theme-sesame .hero,
body.tenant-theme-city-home .hero,
body.tenant-theme-kynex .hero,
.global-sidebar.tenant-theme-sesame,
.global-sidebar.tenant-theme-city-home,
.global-sidebar.tenant-theme-kynex { color: #fff; }

body.tenant-theme-sesame .hero h1,
body.tenant-theme-sesame .hero h2,
body.tenant-theme-sesame .hero p,
body.tenant-theme-city-home .hero h1,
body.tenant-theme-city-home .hero h2,
body.tenant-theme-city-home .hero p,
body.tenant-theme-kynex .hero h1,
body.tenant-theme-kynex .hero h2,
body.tenant-theme-kynex .hero p { color: #fff; }

.global-sidebar.tenant-theme-sesame .workspace-identity,
.global-sidebar.tenant-theme-sesame nav a,
.global-sidebar.tenant-theme-sesame .global-sidebar-user,
.global-sidebar.tenant-theme-city-home .workspace-identity,
.global-sidebar.tenant-theme-city-home nav a,
.global-sidebar.tenant-theme-city-home .global-sidebar-user,
.global-sidebar.tenant-theme-kynex .workspace-identity,
.global-sidebar.tenant-theme-kynex nav a,
.global-sidebar.tenant-theme-kynex .global-sidebar-user { color: #fff; }

body.tenant-theme-sesame .global-sidebar nav a.active,
body.tenant-theme-city-home .global-sidebar nav a.active,
body.tenant-theme-kynex .global-sidebar nav a.active {
    background: color-mix(in srgb, var(--theme-accent) 26%, transparent);
    border-left-color: var(--theme-accent);
}

body.tenant-theme-sesame .global-sidebar nav i,
body.tenant-theme-city-home .global-sidebar nav i,
body.tenant-theme-kynex .global-sidebar nav i,
body.tenant-theme-sesame .eyebrow,
body.tenant-theme-city-home .eyebrow,
body.tenant-theme-kynex .eyebrow {
    color: color-mix(in srgb, var(--theme-accent) 82%, white);
}

body.tenant-theme-sesame .global-sidebar-user .avatar,
body.tenant-theme-city-home .global-sidebar-user .avatar,
body.tenant-theme-kynex .global-sidebar-user .avatar {
    background: var(--theme-accent);
}

body.tenant-theme-sesame .workspace-context-chip,
body.tenant-theme-city-home .workspace-context-chip,
body.tenant-theme-kynex .workspace-context-chip {
    background: var(--theme-soft);
    color: var(--theme-primary);
    border-color: color-mix(in srgb, var(--theme-primary) 22%, white);
}

body.tenant-theme-sesame .tenant-icon-button.active,
body.tenant-theme-city-home .tenant-icon-button.active,
body.tenant-theme-kynex .tenant-icon-button.active {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--theme-accent) 28%, transparent);
}
