/*
 * MENKULEX OS v7.9.3.8.1 - UI Dark Sidebar Fix
 * Non-destructive final visual layer.
 * Scope: center sidebars, sidebar headings, opened menu rows, hover states,
 * dark/white contrast guards and Turkish text rendering polish.
 */
:root {
    --mxos-v666-navy: #07152f;
    --mxos-v666-navy-2: #050b23;
    --mxos-v666-blue: #0b2457;
    --mxos-v666-gold: #e49e2e;
    --mxos-v666-white: #ffffff;
    --mxos-v666-soft: #f4f7fb;
    --mxos-v666-line: rgba(255,255,255,.14);
}

body[class*="mx"][class*="-page"],
body[class*="mxos"],
.toplevel_page_menkulex-os,
[class*="mxos-"] {
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    font-synthesis-weight: none;
}

/* Center sidebar shells: only navigation/heading bands are darkened. Content cards remain untouched. */
body[class*="mx"][class*="-page"] :where(
    .mxsaas-side,.mxsearch-side,.mxcrm-side,.mxfin-side,.mxdoc-side,.mxfr-side,.mxop-side,
    .mxins-side,.mxai-side,.mxis-side,.mxpf-side,.mxkex-side,.mxkx-side,.mxcust-side,
    .mxcontact-side,.mxecom-side,.mxex-side,.mxos-side,.mxos-sidebar
) {
    background: linear-gradient(180deg, var(--mxos-v666-navy-2), var(--mxos-v666-navy)) !important;
    color: var(--mxos-v666-white) !important;
    border-right-color: rgba(228,158,46,.24) !important;
}

body[class*="mx"][class*="-page"] :where(
    .mxsaas-brand,.mxsearch-brand,.mxcrm-brand,.mxfin-brand,.mxdoc-brand,.mxfr-brand,.mxop-brand,
    .mxins-brand,.mxai-brand,.mxis-brand,.mxpf-brand,.mxkex-brand,.mxkx-brand,.mxcust-brand,
    .mxcontact-brand,.mxecom-brand,.mxex-brand,.mxos-brand
) {
    color: var(--mxos-v666-white) !important;
}

body[class*="mx"][class*="-page"] :where(
    .mxsaas-brand strong,.mxsearch-brand strong,.mxcrm-brand strong,.mxfin-brand strong,.mxdoc-brand strong,
    .mxfr-brand strong,.mxop-brand strong,.mxins-brand strong,.mxai-brand strong,.mxis-brand strong,
    .mxpf-brand strong,.mxkex-brand strong,.mxkx-brand strong,.mxcust-brand strong,.mxcontact-brand strong,
    .mxecom-brand strong,.mxex-brand strong,.mxos-brand strong
) {
    color: var(--mxos-v666-white) !important;
    font-weight: 900 !important;
}

body[class*="mx"][class*="-page"] :where(
    .mxsaas-brand small,.mxsearch-brand small,.mxcrm-brand small,.mxfin-brand small,.mxdoc-brand small,
    .mxfr-brand small,.mxop-brand small,.mxins-brand small,.mxai-brand small,.mxis-brand small,
    .mxpf-brand small,.mxkex-brand small,.mxkx-brand small,.mxcust-brand small,.mxcontact-brand small,
    .mxecom-brand small,.mxex-brand small,.mxos-brand small
) {
    color: var(--mxos-v666-gold) !important;
    opacity: 1 !important;
}

/* Main tree headings: dark navy standard. */
body[class*="mx"][class*="-page"] :where(
    .mxsaas-tree summary,.mxsearch-tree summary,.mxcrm-tree summary,.mxfin-tree summary,.mxdoc-tree summary,
    .mxfr-tree summary,.mxop-tree summary,.mxins-tree summary,.mxai-tree summary,.mxis-tree summary,
    .mxpf-tree summary,.mxkex-tree summary,.mxkx-tree summary,.mxcust-tree summary,.mxcontact-tree summary,
    .mxecom-tree summary,.mxex-tree summary,.mxos-tree summary,.mxctree summary
) {
    background: rgba(255,255,255,.065) !important;
    color: var(--mxos-v666-white) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    box-shadow: none !important;
    font-weight: 900 !important;
}

body[class*="mx"][class*="-page"] :where(
    .mxsaas-tree details[open] > summary,.mxsearch-tree details[open] > summary,.mxcrm-tree details[open] > summary,
    .mxfin-tree details[open] > summary,.mxdoc-tree details[open] > summary,.mxfr-tree details[open] > summary,
    .mxop-tree details[open] > summary,.mxins-tree details[open] > summary,.mxai-tree details[open] > summary,
    .mxis-tree details[open] > summary,.mxpf-tree details[open] > summary,.mxkex-tree details[open] > summary,
    .mxkx-tree details[open] > summary,.mxcust-tree details[open] > summary,.mxcontact-tree details[open] > summary,
    .mxecom-tree details[open] > summary,.mxex-tree details[open] > summary,.mxos-tree details[open] > summary,
    .mxctree details[open] > summary
) {
    background: linear-gradient(135deg, var(--mxos-v666-navy), var(--mxos-v666-blue)) !important;
    color: var(--mxos-v666-white) !important;
    border-color: rgba(228,158,46,.42) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.22) !important;
}

body[class*="mx"][class*="-page"] :where(
    .mxsaas-tree details:not([open]) > summary:hover,.mxsearch-tree details:not([open]) > summary:hover,
    .mxcrm-tree details:not([open]) > summary:hover,.mxfin-tree details:not([open]) > summary:hover,
    .mxdoc-tree details:not([open]) > summary:hover,.mxfr-tree details:not([open]) > summary:hover,
    .mxop-tree details:not([open]) > summary:hover,.mxins-tree details:not([open]) > summary:hover,
    .mxai-tree details:not([open]) > summary:hover,.mxis-tree details:not([open]) > summary:hover,
    .mxpf-tree details:not([open]) > summary:hover,.mxkex-tree details:not([open]) > summary:hover,
    .mxkx-tree details:not([open]) > summary:hover,.mxcust-tree details:not([open]) > summary:hover,
    .mxcontact-tree details:not([open]) > summary:hover,.mxecom-tree details:not([open]) > summary:hover,
    .mxex-tree details:not([open]) > summary:hover,.mxos-tree details:not([open]) > summary:hover,
    .mxctree details:not([open]) > summary:hover
) {
    background: linear-gradient(135deg, var(--mxos-v666-gold), #f6b04a) !important;
    color: var(--mxos-v666-navy-2) !important;
    border-color: rgba(255,255,255,.42) !important;
}

body[class*="mx"][class*="-page"] :where(
    .mxsaas-tree a,.mxsearch-tree a,.mxcrm-tree a,.mxfin-tree a,.mxdoc-tree a,.mxfr-tree a,
    .mxop-tree a,.mxins-tree a,.mxai-tree a,.mxis-tree a,.mxpf-tree a,.mxkex-tree a,
    .mxkx-tree a,.mxcust-tree a,.mxcontact-tree a,.mxecom-tree a,.mxex-tree a,.mxos-tree a,
    .mxctree a
) {
    color: rgba(255,255,255,.82) !important;
}

body[class*="mx"][class*="-page"] :where(
    .mxsaas-tree a:hover,.mxsearch-tree a:hover,.mxcrm-tree a:hover,.mxfin-tree a:hover,.mxdoc-tree a:hover,
    .mxfr-tree a:hover,.mxop-tree a:hover,.mxins-tree a:hover,.mxai-tree a:hover,.mxis-tree a:hover,
    .mxpf-tree a:hover,.mxkex-tree a:hover,.mxkx-tree a:hover,.mxcust-tree a:hover,.mxcontact-tree a:hover,
    .mxecom-tree a:hover,.mxex-tree a:hover,.mxos-tree a:hover,.mxctree a:hover
) {
    color: var(--mxos-v666-gold) !important;
}

/* Icons inside selected headings. */
body[class*="mx"][class*="-page"] :where(
    .mxsaas-tree summary i,.mxsearch-tree summary i,.mxcrm-tree summary i,.mxfin-tree summary i,
    .mxdoc-tree summary i,.mxfr-tree summary i,.mxop-tree summary i,.mxins-tree summary i,
    .mxai-tree summary i,.mxis-tree summary i,.mxpf-tree summary i,.mxkex-tree summary i,
    .mxkx-tree summary i,.mxcust-tree summary i,.mxcontact-tree summary i,.mxecom-tree summary i,
    .mxex-tree summary i,.mxos-tree summary i,.mxctree summary i
) {
    border-color: rgba(255,255,255,.42) !important;
    color: inherit !important;
}

body[class*="mx"][class*="-page"] :where(
    .mxsaas-tree details[open] > summary i,.mxsearch-tree details[open] > summary i,
    .mxcrm-tree details[open] > summary i,.mxfin-tree details[open] > summary i,
    .mxdoc-tree details[open] > summary i,.mxfr-tree details[open] > summary i,
    .mxop-tree details[open] > summary i,.mxins-tree details[open] > summary i,
    .mxai-tree details[open] > summary i,.mxis-tree details[open] > summary i,
    .mxpf-tree details[open] > summary i,.mxkex-tree details[open] > summary i,
    .mxkx-tree details[open] > summary i,.mxcust-tree details[open] > summary i,
    .mxcontact-tree details[open] > summary i,.mxecom-tree details[open] > summary i,
    .mxex-tree details[open] > summary i,.mxos-tree details[open] > summary i,.mxctree details[open] > summary i
) {
    background: var(--mxos-v666-gold) !important;
    color: var(--mxos-v666-navy-2) !important;
    border-color: var(--mxos-v666-gold) !important;
}

/* White-on-white guard: only header/band-like elements, not ordinary cards. */
body[class*="mx"][class*="-page"] :where(
    .mxos-command-layer,.mxos-topbar,.mxos-header,.mxos-center-header,.mxos-panel-header,
    .mxcrm-head,.mxfin-head,.mxdoc-head,.mxfr-head,.mxop-head,.mxai-head,.mxcust-head,
    .mxcontact-head,.mxecom-head,.mxpf-head,.mxex-head
) :where(h1,h2,h3,strong,small,p,span) {
    color: inherit;
}

body[class*="mx"][class*="-page"] :where(
    .mxos-dark,.mxos-navy,.mxos-command-layer,.mxos-system-band,.mxos-status-band,
    [class*="hero"],[class*="Hero"]
) :where(h1,h2,h3,h4,strong,p,small,span,a) {
    color: var(--mxos-v666-white) !important;
}

/* Admin panel for this module. */
.mxos-v666-wrap h1 { color:#07152f; font-weight:900; }
.mxos-v666-wrap h2 { margin-top:24px; color:#07152f; }
.mxos-v666-wrap code { color:#07152f; background:#eef3ff; padding:2px 6px; border-radius:6px; }
