/* ==========================================================================
   Coject — Opus 5.5 application shell + shared components
   Used by: Pages/Shared/_LayoutOpus.cshtml (every page that sets Layout = "_LayoutOpus")
   - Light is the default; body.dark (Stream.js → checkTheme) switches to the
     brand dark scheme. Only colour tokens change between the two.
   - New classes are prefixed "cj-". Legacy class names that scripts still use
     (sidemenu, header, right_side, user_profile, breadcrumb …) are kept in the
     markup and neutralised here, so this file must load AFTER the legacy CSS.
   - Logical properties (inline-start/end) so <html dir="rtl"> just works.
   ========================================================================== */

/* ---------- tokens ---------- */
body.cj-body {
    /* brand */
    --cj-dark-blue: #0B0D2E;
    --cj-electric: #00015D;
    --cj-neon-raw: #00FFC3;
    --cj-teal: #09C895;
    --cj-teal-ink: #007561;
    /* surfaces */
    --cj-canvas: #F4F6FB;
    --cj-s0: #FAFBFE;
    --cj-s1: #F3F5FA;
    --cj-s2: #FFFFFF;
    --cj-s3: #EEF1F7;
    --cj-s4: #E3E7F0;
    --cj-panel: #FFFFFF; /* side, top, status, cards, modals */
    --cj-line: rgba(0,1,93,.09);
    --cj-line-2: rgba(0,1,93,.17);
    --cj-input: #6F8DB9;
    --cj-input-bg: #FFFFFF;
    --cj-hover: #E2F5EF; /* menu hover / active tint */
    --cj-disabled: #A3A9BD;
    /* ink */
    --cj-accent: #00015D; /* accent ink (Neon Teal is not allowed on white) */
    --cj-title: #00015D;
    --cj-t1: #0B0D2E;
    --cj-t2: #3A4166;
    --cj-t3: #596285;
    --cj-t4: #646D90;
    --cj-check: #007561;
    --cj-star: #09C895;
    --cj-focus: rgba(9,200,149,.22);
    /* buttons */
    --cj-btn: #00015D;
    --cj-btn-t: #FFFFFF;
    --cj-btn-ic: #00FFC3;
    --cj-btn-hover: #575A78;
    /* signals */
    --cj-danger: #C70D3A;
    --cj-danger-b: #E80F43;
    --cj-success: #1FBF40;
    --cj-success-t: #13802E;
    --cj-warn-bg: #FFF1D2;
    --cj-warn-t: #8A5800;
    /* elevation */
    --cj-shadow-1: 0 1px 2px rgba(11,13,46,.05), 0 0 0 1px rgba(0,1,93,.07);
    --cj-shadow-2: 0 10px 28px rgba(11,13,46,.10), 0 0 0 1px rgba(0,1,93,.07);
    --cj-shadow-menu: 0 18px 40px rgba(11,13,46,.14);
    --cj-scrim: rgba(11,13,46,.34);
    /* progress */
    --cj-bar: linear-gradient(90deg, #09C895, #00E6AF);
    --cj-bar-glow: none;
    /* type */
    --cj-font: "Eudoxus Sans", "eudoxus sans", "Tajawal", system-ui, sans-serif;
    --cj-font-ar: "Tajawal", "Eudoxus Sans", sans-serif;
    --cj-font-mono: "JetBrains Mono", "Tajawal", ui-monospace, monospace;
    /* radius / motion */
    --cj-r-xs: 6px;
    --cj-r-sm: 8px;
    --cj-r: 10px;
    --cj-r-lg: 16px;
    --cj-r-xl: 22px;
    --cj-ease: cubic-bezier(.2,.7,.2,1);
    /* shell */
    --cj-side-w: 252px;
    --cj-side-w-closed: 72px;
    --cj-top-h: 64px;
    --cj-status-h: 30px;
}

    body.cj-body.dark {
        --cj-canvas: #0B0D2E;
        --cj-s0: #070920;
        --cj-s1: #12153A;
        --cj-s2: #191B3B;
        --cj-s3: #22254A;
        --cj-s4: #2B2F58;
        --cj-panel: #0B0D2E;
        --cj-line: rgba(121,153,195,.16);
        --cj-line-2: rgba(121,153,195,.28);
        --cj-input: #7999C3;
        --cj-input-bg: transparent;
        --cj-hover: #00015D;
        --cj-disabled: #37466A;
        --cj-accent: #00FFC3;
        --cj-title: #FFFFFF;
        --cj-t1: #FFFFFF;
        --cj-t2: #C3CAE6;
        --cj-t3: #97A1C9;
        --cj-t4: #7F8AB5;
        --cj-check: #00FFC3;
        --cj-star: #00FFC3;
        --cj-focus: rgba(0,255,195,.18);
        --cj-btn: #FFFFFF;
        --cj-btn-t: #00015D;
        --cj-btn-ic: #00B98C;
        --cj-btn-hover: #C5C5D8;
        --cj-danger: #FF6B6B;
        --cj-danger-b: #F54141;
        --cj-success-t: #4FD86B;
        --cj-warn-bg: rgba(255,201,77,.13);
        --cj-warn-t: #FFC94D;
        --cj-shadow-1: none;
        --cj-shadow-2: 0 18px 40px rgba(0,0,0,.35);
        --cj-shadow-menu: 0 18px 40px rgba(0,0,0,.45);
        --cj-scrim: rgba(5,6,26,.72);
        --cj-bar: linear-gradient(90deg, #00B98C, #00FFC3);
        --cj-bar-glow: 0 0 10px rgba(0,255,195,.5);
    }

/* ---------- base (overrides main.css: 12px / dark body / global font) ---------- */
html, body.cj-body {
    font-size: 14px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

body.cj-body {
    margin: 0;
    background: var(--cj-canvas);
    color: var(--cj-t1);
    font-family: var(--cj-font);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

    body.cj-body * {
        font-family: inherit;
    }

    body.cj-body i[class*="fa-"] {
        font-family: "Font Awesome 6 Pro";
    }

    body.cj-body .ar, body.cj-body [dir="rtl"] {
        font-family: var(--cj-font-ar);
    }

    body.cj-body .cj-mono-font, body.cj-body code {
        font-family: var(--cj-font-mono);
    }

    body.cj-body ::selection {
        background: #CDEFE4;
        color: var(--cj-electric);
    }

    body.cj-body :focus-visible {
        outline: 2px solid var(--cj-teal);
        outline-offset: 2px;
        border-radius: 6px;
    }
    /* fields show focus with their own border — no extra teal outline ring around them */
    body.cj-body input:not([type="checkbox"]):not([type="radio"]):focus-visible,
    body.cj-body select:focus-visible, body.cj-body textarea:focus-visible,
    body.cj-body .k-dropdown:focus-visible, body.cj-body .k-dropdown-wrap:focus-visible {
        outline: none;
    }

    body.cj-body h1, body.cj-body h2, body.cj-body h3, body.cj-body h4, body.cj-body h5 {
        margin: 0;
    }

    body.cj-body p {
        margin: 0;
    }

    body.cj-body *::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    body.cj-body *::-webkit-scrollbar-thumb {
        background: #CDD2E0;
        border-radius: 10px;
        border: 3px solid transparent;
        background-clip: content-box;
    }

        body.cj-body *::-webkit-scrollbar-thumb:hover {
            background: #AEB5CA;
            background-clip: content-box;
        }

    body.cj-body.dark *::-webkit-scrollbar-thumb {
        background: #2B2F58;
        background-clip: content-box;
    }

    body.cj-body *::-webkit-scrollbar-track {
        background: transparent;
    }

/* icons (Lucide sprite in _LayoutOpus: <svg class="cj-ic"><use href="#cj-i-…"/></svg>) */
.cj-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.cj-ic {
    width: 18px;
    height: 18px;
    flex: none;
    display: inline-block;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cj-app .cj-top .cj-top-actions .cj-ic {
    width: 18px;
    height: 18px;
}

.cj-btn .cj-ic {
    width: 17px;
    height: 17px;
}

.cj-btn-primary .cj-ic, .cj-btn-run .cj-ic {
    color: var(--cj-btn-ic);
}

.cj-btn-run .cj-ic {
    color: var(--cj-neon-raw);
}

.cj-ov {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cj-t3);
}

.cj-sep {
    color: var(--cj-teal);
    margin: 0 8px;
    font-weight: 700;
}

.cj-muted {
    color: var(--cj-t3);
}

.cj-num {
    font-variant-numeric: tabular-nums;
}

.cj-hidden {
    display: none !important;
}

body.cj-body .dark-only {
    display: none !important;
}

body.cj-body.dark .dark-only {
    display: block !important;
}

body.cj-body.dark .light-only {
    display: none !important;
}

/* ==========================================================================
   APP SHELL
   ========================================================================== */
.cj-app {
    height: 100vh;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: var(--cj-top-h) minmax(0, 1fr) var(--cj-status-h);
    grid-template-areas: "side top" "side main" "side status";
}

/* ---------- sidebar (#sideMenu; .closed toggled by script.js / Stream.js) ---------- */
#sideMenu.cj-side {
    grid-area: side;
    width: var(--cj-side-w);
    height: 100vh;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    background: var(--cj-panel);
    border-inline-end: 1px solid var(--cj-line);
    transition: width .25s var(--cj-ease);
}

    #sideMenu.cj-side.closed {
        width: var(--cj-side-w-closed);
    }

#sideMenu .cj-logo {
    height: var(--cj-top-h);
    flex: none;
    display: flex;
    align-items: center;
    padding: 0 22px;
    margin: 0;
}

    #sideMenu .cj-logo img {
        display: block;
        width: auto;
        margin: 0;
    }

    #sideMenu .cj-logo .cj-logo-full {
        height: 28px;
    }

    #sideMenu .cj-logo .cj-logo-ico {
        height: 26px;
        display: none !important;
    }

#sideMenu.closed .cj-logo {
    padding: 0;
    justify-content: center;
}

    #sideMenu.closed .cj-logo .cj-logo-full {
        display: none !important;
    }

    #sideMenu.closed .cj-logo .cj-logo-ico.light-only {
        display: block !important;
    }

body.dark #sideMenu.closed .cj-logo .cj-logo-ico.light-only {
    display: none !important;
}

body.dark #sideMenu.closed .cj-logo .cj-logo-ico.dark-only {
    display: block !important;
}

#sideMenu .cj-side-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 14px 14px;
    scrollbar-width: none;
}

    #sideMenu .cj-side-scroll::-webkit-scrollbar {
        display: none;
    }
/* no visible scrollbar (wheel / touch still scroll on short screens) */
/* collapsed: the list still scrolls (so the footer with #sideMenuBtn is never pushed off-screen);
   its scrollbar is hidden in the 72px rail and the tooltips escape the clip (see "tooltips" below) */
#sideMenu.closed .cj-side-scroll {
    padding: 10px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

    #sideMenu.closed .cj-side-scroll::-webkit-scrollbar {
        display: none;
    }

#sideMenu.closed {
    overflow: visible;
}

#sideMenu .cj-nav-h {
    padding: 16px 10px 8px;
    white-space: nowrap;
}

#sideMenu.closed .cj-nav-h {
    display: none;
}

#sideMenu .cj-nav-sp {
    height: 6px;
}

#sideMenu.closed .cj-nav-sp {
    height: 10px;
    border-top: 1px solid var(--cj-line);
    margin: 10px 4px 0;
}

/* nav items — works for any <ul class="cj-nav"> including #ulNavPages */
#sideMenu .cj-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

    #sideMenu .cj-nav li {
        position: relative;
        margin: 0;
        text-align: start;
    }

        #sideMenu .cj-nav li::before {
            content: none;
        }

        #sideMenu .cj-nav li > a {
            position: relative;
            display: flex;
            align-items: center;
            gap: 12px;
            height: 38px;
            padding: 0 10px;
            border-radius: var(--cj-r);
            color: var(--cj-t2);
            font-size: 14px;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            cursor: pointer;
            transition: background .15s, color .15s;
        }

            #sideMenu .cj-nav li > a i {
                width: 20px;
                margin: 0;
                font-size: 17px;
                text-align: center;
                color: var(--cj-t3);
                flex: none;
            }

            #sideMenu .cj-nav li > a .cj-ic {
                width: 19px;
                height: 19px;
                margin: 0;
                color: var(--cj-t3);
            }

            #sideMenu .cj-nav li > a span {
                display: inline;
            }

        #sideMenu .cj-nav li:hover > a {
            background: var(--cj-s1);
            color: var(--cj-accent);
        }

            #sideMenu .cj-nav li:hover > a i, #sideMenu .cj-nav li:hover > a .cj-ic {
                color: var(--cj-accent);
            }

        #sideMenu .cj-nav li.active > a {
            background: var(--cj-hover);
            color: var(--cj-title);
            font-weight: 700;
        }

            #sideMenu .cj-nav li.active > a i, #sideMenu .cj-nav li.active > a .cj-ic {
                color: var(--cj-accent);
            }

        #sideMenu .cj-nav li.active::before {
            content: "";
            position: absolute;
            inset-inline-start: -14px;
            left: auto;
            top: 9px;
            bottom: 9px;
            height: auto;
            width: 4px;
            border-radius: 0 4px 4px 0;
            background: var(--cj-teal);
            z-index: 1;
        }

[dir="rtl"] #sideMenu .cj-nav li.active::before {
    border-radius: 4px 0 0 4px;
}

body.dark #sideMenu .cj-nav li.active::before {
    background: var(--cj-neon-raw);
    box-shadow: 0 0 12px rgba(0,255,195,.8);
}

body.dark #sideMenu .cj-nav li:hover > a {
    background: var(--cj-s2);
    color: #fff;
}

body.dark #sideMenu .cj-nav li.active > a {
    background: var(--cj-electric);
    color: #fff;
}

#sideMenu.closed .cj-nav li > a {
    justify-content: center;
    padding: 0;
    width: 46px;
    height: 42px;
}

    #sideMenu.closed .cj-nav li > a span {
        display: none;
    }

#sideMenu.closed .cj-nav li.active::before {
    inset-inline-start: -12px;
}

/* project chip (SIDENAV on project pages) */
#sideMenu .cj-proj-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin: 2px 0 6px;
    border-radius: 12px;
    background: var(--cj-s1);
    border: 1px solid var(--cj-line);
    color: var(--cj-t1);
    white-space: nowrap;
    overflow: hidden;
}

    #sideMenu .cj-proj-chip b {
        display: block;
        font-size: 13.5px;
        color: var(--cj-title);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #sideMenu .cj-proj-chip small {
        display: block;
        font-size: 11.5px;
        color: var(--cj-t3);
    }

    #sideMenu .cj-proj-chip > div {
        min-width: 0;
    }

.cj-mono {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid !important;
    place-items: center;
    border-radius: 9px;
    background: var(--cj-electric);
    color: var(--cj-neon-raw);
    font-weight: 800;
    font-size: 13px;
}

#sideMenu.closed .cj-proj-chip {
    padding: 5px;
    justify-content: flex-start;
    width: 46px;
}

    #sideMenu.closed .cj-proj-chip > div {
        display: none;
    }

/* footer: help box + collapse */
#sideMenu .cj-side-foot {
    margin: 0;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--cj-line);
    flex: none;
    background: var(--cj-panel);
}

#sideMenu.closed .cj-side-foot {
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#sideMenu .cj-help-box {
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: var(--cj-s1);
    white-space: nowrap;
    overflow: hidden;
}

    #sideMenu .cj-help-box span, #sideMenu .cj-help-box a {
        position: static;
        display: block;
        transform: none;
    }

    #sideMenu .cj-help-box small {
        display: block;
        font-size: 12px;
        color: var(--cj-t3);
    }

    #sideMenu .cj-help-box strong {
        display: block;
        font-size: 13px;
        font-weight: 700;
        color: var(--cj-title);
    }

    #sideMenu .cj-help-box a:hover strong {
        color: var(--cj-teal-ink);
    }

body.dark #sideMenu .cj-help-box a:hover strong {
    color: var(--cj-neon-raw);
}

#sideMenu.closed .cj-help-box, #sideMenu.cj-has-proj .cj-help-box {
    display: none;
}
/* project pages: no help box, as in the design */
#sideMenu .cj-nav-btn {
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: var(--cj-r);
    background: none;
    box-shadow: none;
    color: var(--cj-t2);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

    #sideMenu .cj-nav-btn i {
        width: 20px;
        margin: 0;
        font-size: 16px;
        color: var(--cj-t3);
        transition: transform .25s var(--cj-ease);
        transform: none;
    }

    #sideMenu .cj-nav-btn .cj-ic {
        width: 19px;
        height: 19px;
        margin: 0;
        color: var(--cj-t3);
        transition: transform .25s var(--cj-ease);
        transform: none;
    }

    #sideMenu .cj-nav-btn:hover {
        background: var(--cj-s1);
        color: var(--cj-accent);
    }

        #sideMenu .cj-nav-btn:hover i, #sideMenu .cj-nav-btn:hover .cj-ic {
            color: var(--cj-accent);
            transform: none;
        }

    #sideMenu .cj-nav-btn span {
        display: inline;
    }

#sideMenu.closed .cj-nav-btn {
    justify-content: center;
    width: 46px;
    padding: 0;
    overflow: visible;
}

    #sideMenu.closed .cj-nav-btn span {
        display: none;
    }

    #sideMenu.closed .cj-nav-btn i, #sideMenu.closed .cj-nav-btn:hover i,
    #sideMenu.closed .cj-nav-btn .cj-ic, #sideMenu.closed .cj-nav-btn:hover .cj-ic {
        transform: scaleX(-1);
    }

[dir="rtl"] #sideMenu .cj-nav-btn i, [dir="rtl"] #sideMenu .cj-nav-btn .cj-ic {
    transform: scaleX(-1);
}

[dir="rtl"] #sideMenu.closed .cj-nav-btn i, [dir="rtl"] #sideMenu.closed .cj-nav-btn .cj-ic {
    transform: none;
}

#sideMenu:not(.closed) .cj-nav-btn[data-tip]:hover::after {
    display: none;
}

/* tooltips: sidebar shows them only when collapsed (to the side), elsewhere below */
.cj-app [data-tip] {
    position: relative;
}

    .cj-app [data-tip]:hover::after {
        content: attr(data-tip);
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        padding: 5px 9px;
        border-radius: 7px;
        background: var(--cj-electric);
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.3;
        white-space: nowrap;
        pointer-events: none;
        z-index: 90;
        box-shadow: 0 8px 22px rgba(11,13,46,.22);
    }

body.dark .cj-app [data-tip]:hover::after {
    background: #fff;
    color: var(--cj-electric);
}

#sideMenu [data-tip]:hover::after {
    display: none;
}

#sideMenu.closed [data-tip]:hover::after {
    display: block;
    top: 50%;
    left: auto;
    inset-inline-start: calc(100% + 12px);
    transform: translateY(-50%);
}
/* inside the scrolling list a normal absolute tooltip would be clipped, so it is
   position:fixed at its static place (right under the item) and moved beside it with margins */
#sideMenu.closed .cj-side-scroll [data-tip]:hover::after {
    position: fixed;
    top: auto;
    left: auto;
    right: auto;
    inset-inline-start: auto;
    transform: none;
    margin-inline-start: 58px;
    margin-top: -40px;
}

#sideMenu.closed .cj-side-scroll .cj-proj-chip[data-tip]:hover::after {
    margin-top: 0;
    margin-inline-start: 52px;
}

/* ---------- top bar ---------- */
.cj-app .cj-top {
    grid-area: top;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin: 0;
    padding: 0 20px 0 24px;
    padding-inline: 24px 20px;
    background: var(--cj-panel);
    border-bottom: 1px solid var(--cj-line);
    position: relative;
    z-index: 40;
}

    .cj-app .cj-top .cj-crumbs {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
    }

.cj-app .cj-crumbs .breadcrumb {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
    padding: 0;
    background: none;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    white-space: nowrap;
    overflow: hidden;
}

.cj-app .cj-crumbs ol li,
.cj-app .cj-crumbs .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    padding: 0;
    color: var(--cj-t3) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
}

    .cj-app .cj-crumbs .breadcrumb-item + .breadcrumb-item {
        padding-inline-start: 0;
    }

        .cj-app .cj-crumbs .breadcrumb-item + .breadcrumb-item::before {
            content: "/" !important;
            float: none;
            padding: 0;
            margin: 0 10px;
            color: var(--cj-teal) !important;
            font-weight: 700;
        }

body.dark .cj-app .cj-crumbs .breadcrumb-item + .breadcrumb-item::before {
    color: var(--cj-neon-raw) !important;
}

.cj-app .cj-crumbs .breadcrumb-item a {
    color: inherit;
}

    .cj-app .cj-crumbs .breadcrumb-item a:hover {
        color: var(--cj-accent);
    }

.cj-app .cj-crumbs .breadcrumb-item:last-child {
    color: var(--cj-title) !important;
    font-weight: 700 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* right side actions (HEADER section + tour/lang/user) */
.cj-app .cj-top .cj-top-actions {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    flex: none;
}

    .cj-app .cj-top .cj-top-actions > ul {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

        .cj-app .cj-top .cj-top-actions > ul > li {
            position: relative;
            margin: 0;
            padding: 0;
            background: none;
            border-radius: 0;
            list-style: none;
        }

            .cj-app .cj-top .cj-top-actions > ul > li:hover,
            .cj-app .cj-top .cj-top-actions > ul > li.active {
                background: none;
            }

    .cj-app .cj-top .cj-top-actions i {
        padding: 0 !important;
        font-size: 17px !important;
        width: auto;
        height: auto;
        color: inherit;
    }

    .cj-app .cj-top .cj-top-actions li:hover i {
        color: inherit;
    }

.cj-app .cj-top .cj-vsep {
    width: 1px;
    height: 24px;
    background: var(--cj-line-2) !important;
    margin: 0 4px !important;
}

/* legacy header.css hides every <span> in .right_side and pops it on hover — undo for real content */
.cj-app .cj-top .cj-top-actions li span:not(.cj-tip),
.cj-app .cj-top .cj-top-actions li:hover span:not(.cj-tip) {
    position: static;
    display: inline;
    transform: none;
    top: auto;
    left: auto;
    z-index: auto;
    font-size: inherit;
    color: inherit;
    white-space: nowrap;
}

/* icon button li (tour, language, …) */
.cj-app .cj-top li.cj-ib > a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: var(--cj-r);
    color: var(--cj-t2);
    transition: background .15s, color .15s;
}

.cj-app .cj-top li.cj-ib:hover > a {
    background: var(--cj-hover);
    color: var(--cj-accent);
}

body.dark .cj-app .cj-top li.cj-ib:hover > a {
    color: #fff;
}
/* the legacy hover <span> labels become tooltips */
.cj-app .cj-top .cj-top-actions span.cj-tip {
    display: none;
    position: absolute;
}

.cj-app .cj-top .cj-top-actions li:hover > span.cj-tip {
    display: block;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 9px;
    border-radius: 7px;
    background: var(--cj-electric);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    z-index: 90;
    box-shadow: 0 8px 22px rgba(11,13,46,.22);
}

body.dark .cj-app .cj-top .cj-top-actions li:hover > span.cj-tip {
    background: #fff;
    color: var(--cj-electric);
}

/* user avatar + menu (.open toggled by the existing scripts) */
.cj-app .cj-top li.cj-me > a {
    display: block;
    padding: 3px;
    border-radius: 99px;
}

.cj-app .cj-top li.cj-me img#dvImgUser {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border: 2px solid var(--cj-electric);
    border-radius: 50%;
    background: var(--cj-teal);
}

body.dark .cj-app .cj-top li.cj-me img#dvImgUser {
    border-color: var(--cj-neon-raw);
}
/* no broken-image icon / alt text before the scripts set a src */
body.cj-body img:not([src]), body.cj-body img[src=""] {
    content: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}

[dir="rtl"] .cj-app .cj-top .cj-menu, [dir="rtl"] .cj-app .cj-top li.cj-me #notfyAnnouncement {
    right: auto;
    left: 0;
}

.cj-app .cj-top li.cj-me #notfyAnnouncement {
    position: absolute;
    right: 0;
    left: auto;
    bottom: 2px;
    width: 15px;
    height: 15px;
    line-height: 13px;
    border: 2px solid var(--cj-panel);
    border-radius: 50%;
    background: var(--cj-danger-b);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    text-align: center;
    z-index: 2;
}

.cj-app .cj-top .cj-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    min-width: 230px;
    margin: 0;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--cj-s2);
    border: 1px solid var(--cj-line-2);
    border-radius: 14px;
    box-shadow: var(--cj-shadow-menu);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
    z-index: 60;
}

    .cj-app .cj-top .cj-menu.open {
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .cj-app .cj-top .cj-menu > li {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        padding: 0 10px;
        min-height: 36px;
        border-radius: 8px;
        background: none;
        color: var(--cj-t2);
        font-size: 13.5px;
        white-space: nowrap;
        cursor: pointer;
    }

        .cj-app .cj-top .cj-menu > li > a {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            color: inherit;
        }

        .cj-app .cj-top .cj-menu > li i {
            width: 18px;
            text-align: center;
            font-size: 15px !important;
            color: var(--cj-t3) !important;
        }

        .cj-app .cj-top .cj-menu > li label {
            margin: 0;
            cursor: pointer;
            color: inherit;
        }

        .cj-app .cj-top .cj-menu > li#themeModeli > a#themeBtn {
            flex: none;
        }

        .cj-app .cj-top .cj-menu > li:hover {
            background: var(--cj-hover);
            color: var(--cj-accent);
        }

body.dark .cj-app .cj-top .cj-menu > li:hover {
    color: #fff;
}

.cj-app .cj-top .cj-menu > li:hover i {
    color: var(--cj-accent) !important;
}

.cj-app .cj-top .cj-menu > li.user-name {
    display: block;
    padding: 10px;
    margin-bottom: 4px;
    min-height: 0;
    border-bottom: 1px solid var(--cj-line);
    border-radius: 0;
    font-weight: 700;
    color: var(--cj-title);
    cursor: default;
    white-space: normal;
}

    .cj-app .cj-top .cj-menu > li.user-name:hover {
        background: none;
    }

.cj-app .cj-top .cj-menu > li:last-child, .cj-app .cj-top .cj-menu > li:last-child i {
    color: var(--cj-danger) !important;
}

    .cj-app .cj-top .cj-menu > li:last-child:hover {
        background: rgba(232,15,67,.08);
    }

/* global search pill (optional, in HEADER) */
.cj-gsearch {
    height: 38px;
    width: 240px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px 0 12px;
    padding-inline: 12px 10px;
    border-radius: var(--cj-r);
    background: var(--cj-s1);
    border: 1px solid var(--cj-line);
    color: var(--cj-t4);
    font-size: 13px;
    cursor: text;
}

    .cj-gsearch:hover, .cj-gsearch:focus-within {
        border-color: var(--cj-input);
    }

    .cj-gsearch input {
        flex: 1;
        min-width: 0;
        border: 0;
        outline: 0;
        background: none;
        color: var(--cj-t1);
        font-size: 13px;
    }

        .cj-gsearch input::placeholder {
            color: var(--cj-t4);
        }

.cj-app .cj-top .cj-gsearch i {
    font-size: 15px !important;
    color: var(--cj-t4);
}

/* ---------- main ---------- */
.cj-app .cj-main {
    grid-area: main;
    display: block;
    position: relative;
    min-width: 0;
    min-height: 0;
    height: auto !important;
    overflow: auto;
    background: var(--cj-canvas);
}

/* ---------- announcements drawer (#sidebar-announcement; replaces style-sidebar.css)
   hidden until a script adds .active / .open / .show to it ---------- */
#sidebar-announcement.cj-drawer {
    position: fixed;
    top: calc(var(--cj-top-h) + 8px);
    bottom: calc(var(--cj-status-h) + 8px);
    right: 12px;
    left: auto;
    width: 360px;
    max-width: calc(100vw - 24px);
    margin: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
    background: var(--cj-s2);
    border: 1px solid var(--cj-line-2);
    border-radius: var(--cj-r-lg);
    box-shadow: var(--cj-shadow-menu);
    z-index: 70;
    visibility: hidden;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity .2s, transform .2s var(--cj-ease), visibility .2s;
}

[dir="rtl"] #sidebar-announcement.cj-drawer {
    right: auto;
    left: 12px;
    transform: translateX(-16px);
}

#sidebar-announcement.cj-drawer.active,
#sidebar-announcement.cj-drawer.open,
#sidebar-announcement.cj-drawer.show {
    visibility: visible;
    opacity: 1;
    transform: none;
}

#sidebar-announcement .team, #sidebar-announcement .page_body {
    height: 100%;
    min-height: 0;
}

#sidebar-announcement #ulAnnouncementData {
    height: 100%;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    #sidebar-announcement #ulAnnouncementData > li {
        padding: 12px 14px;
        border-radius: 12px;
        background: var(--cj-s1);
        color: var(--cj-t2);
        font-size: 13px;
    }

        #sidebar-announcement #ulAnnouncementData > li b,
        #sidebar-announcement #ulAnnouncementData > li h5,
        #sidebar-announcement #ulAnnouncementData > li strong {
            color: var(--cj-title);
            font-weight: 700;
        }

/* ---------- status bar ---------- */
.cj-app .cj-status {
    grid-area: status;
    height: var(--cj-status-h);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    padding: 0 16px;
    border-top: 1px solid var(--cj-line);
    background: var(--cj-panel);
    color: var(--cj-t3);
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
}

.cj-status .cj-st {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .cj-status .cj-st i {
        font-size: 12px;
    }

    .cj-status .cj-st .cj-ic {
        width: 13px;
        height: 13px;
    }

.cj-status .cj-st-c {
    margin: 0 auto;
    font-style: italic;
}

    .cj-status .cj-st-c b {
        color: var(--cj-t2);
        font-weight: 700;
    }

.cj-status .cj-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cj-teal);
    box-shadow: 0 0 0 3px rgba(9,200,149,.22);
}

body.dark .cj-status .cj-live {
    background: var(--cj-neon-raw);
    box-shadow: 0 0 8px var(--cj-neon-raw);
}

/* ==========================================================================
   PAGE SCAFFOLD
   ========================================================================== */
.cj-page {
    padding: 28px 32px 40px;
    max-width: 1720px;
}

.cj-page-h {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

    .cj-page-h h1 {
        font-size: 30px;
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -.01em;
        color: var(--cj-title);
    }

    .cj-page-h p {
        margin-top: 6px;
        font-size: 14px;
        color: var(--cj-t3);
    }

    .cj-page-h .cj-ov {
        margin-bottom: 8px;
    }

    .cj-page-h .cj-r {
        margin-inline-start: auto;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.cj-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

    .cj-toolbar .cj-push {
        margin-inline-start: auto;
    }

/* ==========================================================================
   SHARED COMPONENTS
   ========================================================================== */
/* buttons — .cj-btn on <a>, <button> or a <li><a> from the HEADER section */
.cj-btn, .cj-app .cj-top .cj-top-actions .cj-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    margin: 0;
    border: 0;
    border-radius: var(--cj-r);
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}

    .cj-btn p {
        margin: 0;
        padding: 0 !important;
        font-size: inherit !important;
        word-spacing: normal !important;
        letter-spacing: normal;
    }
    /* sentence case, even when translation.js writes the label in capitals ("CREATE PROJECT" → "Create project") */
    .cj-app .cj-top .cj-top-actions .cj-btn p {
        text-transform: lowercase;
    }

        .cj-app .cj-top .cj-top-actions .cj-btn p::first-letter {
            text-transform: uppercase;
        }

    .cj-btn i {
        font-size: 15px !important;
        padding: 0 !important;
    }

.cj-btn-primary, .cj-app .cj-top .cj-top-actions .cj-btn-primary {
    background: var(--cj-btn);
    color: var(--cj-btn-t);
}

    .cj-btn-primary i, .cj-app .cj-top .cj-top-actions .cj-btn-primary i {
        color: var(--cj-btn-ic) !important;
    }

    .cj-btn-primary:hover, .cj-app .cj-top .cj-top-actions .cj-btn-primary:hover {
        background: var(--cj-btn-hover);
        color: var(--cj-btn-t);
    }

    .cj-btn-primary:disabled {
        background: #DDE0E6;
        color: #fff;
        cursor: default;
    }

.cj-btn-secondary {
    background: transparent;
    border: 1.5px solid var(--cj-electric);
    color: var(--cj-electric);
}

    .cj-btn-secondary i {
        color: var(--cj-electric) !important;
    }

    .cj-btn-secondary:hover {
        background: var(--cj-electric);
        color: #fff;
    }

        .cj-btn-secondary:hover i {
            color: var(--cj-neon-raw) !important;
        }

body.dark .cj-btn-secondary {
    border-color: rgba(255,255,255,.55);
    color: #fff;
}

    body.dark .cj-btn-secondary i {
        color: var(--cj-neon-raw) !important;
    }

.cj-btn-run {
    background: var(--cj-electric);
    color: #fff;
    border: 1px solid var(--cj-electric);
}

    .cj-btn-run i {
        color: var(--cj-neon-raw) !important;
    }

    .cj-btn-run:hover {
        box-shadow: 0 0 0 3px rgba(9,200,149,.28);
    }

.cj-btn-ghost {
    background: none;
    color: var(--cj-accent);
    padding: 0 12px;
}

    .cj-btn-ghost i {
        color: var(--cj-teal-ink) !important;
    }

    .cj-btn-ghost:hover {
        background: var(--cj-hover);
    }

.cj-btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: var(--cj-r-sm);
}

.cj-btn-lg {
    height: 46px;
    padding: 0 22px;
    font-size: 15px;
}

.cj-ibtn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: var(--cj-r);
    background: none;
    color: var(--cj-t2);
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .cj-ibtn:hover, .cj-ibtn.on {
        background: var(--cj-hover);
        color: var(--cj-accent);
    }

    .cj-ibtn.sm {
        width: 30px;
        height: 30px;
        border-radius: var(--cj-r-sm);
    }

/* typed text always uses the theme ink — also while focused / autofilled
   (legacy rules set white text on inputs, which vanished on the light theme) */
body.cj-body input:not([type="checkbox"]):not([type="radio"]), body.cj-body textarea, body.cj-body select,
body.cj-body input:not([type="checkbox"]):not([type="radio"]):focus,
body.cj-body input:not([type="checkbox"]):not([type="radio"]):hover,
body.cj-body textarea:focus, body.cj-body select:focus {
    color: var(--cj-t1);
    -webkit-text-fill-color: var(--cj-t1);
    caret-color: var(--cj-t1);
}

body.cj-body .coject-input:focus, body.cj-body .coject-textarea:focus,
body.cj-body .cj-inp input:focus, body.cj-body .cj-gsearch input:focus,
body.cj-body .form-control:focus {
    color: var(--cj-t1) !important;
    -webkit-text-fill-color: var(--cj-t1);
    background-color: var(--cj-input-bg);
}

body.cj-body .cj-inp.soft input:focus {
    background: transparent;
}

body.cj-body .cj-inp input:focus, body.cj-body .cj-inp input:focus-visible,
body.cj-body .cj-gsearch input:focus-visible {
    outline: none;
    box-shadow: none;
}

body.cj-body input::placeholder, body.cj-body textarea::placeholder {
    color: var(--cj-t4);
    -webkit-text-fill-color: var(--cj-t4);
    opacity: 1;
}

body.cj-body input:-webkit-autofill, body.cj-body input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--cj-t1);
    -webkit-box-shadow: 0 0 0 40px var(--cj-s2) inset;
    transition: background-color 9999s;
}

/* text input with leading icon:  <label class="cj-inp"><i/><input/></label> */
.cj-inp {
    height: 40px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 0 13px;
    border: 1.5px solid var(--cj-input);
    border-radius: var(--cj-r);
    background: var(--cj-input-bg);
    color: var(--cj-t1);
    transition: border-color .15s, box-shadow .15s, background .15s;
}

    .cj-inp > i {
        font-size: 15px;
        color: var(--cj-t3);
    }

    .cj-inp input {
        flex: 1;
        min-width: 0;
        width: 100%;
        border: 0;
        outline: 0;
        background: none;
        color: var(--cj-t1);
        font-size: 14px;
    }

        .cj-inp input::placeholder {
            color: var(--cj-t4);
        }

    .cj-inp:focus-within {
        border-color: var(--cj-accent);
        box-shadow: 0 0 0 3px var(--cj-focus);
    }

    .cj-inp.soft {
        border-color: transparent;
        background: var(--cj-s2);
        box-shadow: var(--cj-shadow-1);
    }

        .cj-inp.soft:hover {
            border-color: var(--cj-input);
        }
        /* focus = design: Electric-Blue border on white, the card shadow stays, no glow ring */
        .cj-inp.soft:focus-within {
            border-color: var(--cj-electric);
            background: #fff;
            box-shadow: var(--cj-shadow-1);
        }

            .cj-inp.soft:focus-within > i {
                color: var(--cj-t3);
            }

body.dark .cj-inp.soft {
    background: var(--cj-s2);
}

    body.dark .cj-inp.soft:focus-within {
        border-color: #fff;
        background: var(--cj-s1);
        box-shadow: 0 0 0 3px var(--cj-focus);
    }

/* native select styled like the design's dropdown */
.cj-select {
    height: 40px;
    padding: 0 38px 0 14px;
    padding-inline: 14px 38px;
    border: 1.5px solid var(--cj-input);
    border-radius: var(--cj-r);
    background-color: var(--cj-input-bg);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23596285' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    color: var(--cj-t1);
    font-size: 13.5px;
    font-weight: 700;
    outline: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

[dir="rtl"] .cj-select {
    background-position: left 12px center;
}

.cj-select:hover {
    border-color: var(--cj-accent);
}

.cj-select:focus {
    border-color: var(--cj-accent);
    box-shadow: 0 0 0 3px var(--cj-focus);
}

.cj-select.soft {
    border-color: transparent;
    background-color: var(--cj-s2);
    box-shadow: var(--cj-shadow-1);
}

    .cj-select.soft:hover {
        border-color: var(--cj-input);
    }

    .cj-select.soft:focus {
        border-color: var(--cj-electric);
        background-color: #fff;
        box-shadow: var(--cj-shadow-1);
    }

body.dark .cj-select.soft:focus {
    border-color: #fff;
    background-color: var(--cj-s1);
    box-shadow: 0 0 0 3px var(--cj-focus);
}

.cj-select option {
    color: var(--cj-electric);
    background: #fff;
}

.cj-kbd {
    font-family: var(--cj-font-mono);
    font-size: 11px;
    color: var(--cj-t3);
    border: 1px solid var(--cj-line-2);
    border-radius: 5px;
    padding: 1px 6px;
    margin-inline-start: auto;
}

/* brand dropdown — built by layout-opus.js over <select data-cj-dd>
   (dark field / white menu, Electric-Blue frame, teal check on the selected item) */
select.cj-dd-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.cj-dd {
    position: relative;
    display: inline-block;
    min-width: 0;
}

.cj-dd-btn {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 0 12px 0 14px;
    padding-inline: 14px 12px;
    border: 1.5px solid var(--cj-input);
    border-radius: var(--cj-r);
    background: var(--cj-input-bg);
    color: var(--cj-t1);
    font-size: 13.5px;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
    transition: border-color .15s, border-radius .1s;
}

    .cj-dd-btn .cj-dd-val {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cj-dd-btn svg {
        flex: none;
        color: var(--cj-t3);
        transition: transform .2s;
    }

    .cj-dd-btn:hover {
        border-color: var(--cj-electric);
    }

body.cj-body .cj-dd-btn:focus-visible {
    outline: none;
    border-color: var(--cj-electric);
}

.cj-dd.soft .cj-dd-btn {
    border-color: transparent;
    background: var(--cj-s2);
    box-shadow: var(--cj-shadow-1);
}

    .cj-dd.soft .cj-dd-btn:hover {
        border-color: var(--cj-input);
    }

body.cj-body .cj-dd.soft .cj-dd-btn:focus-visible {
    border-color: var(--cj-electric);
    background: #fff;
}

body.cj-body.dark .cj-dd.soft .cj-dd-btn:focus-visible {
    border-color: #fff;
    background: var(--cj-s2);
}

.cj-dd.open .cj-dd-btn,
.cj-dd.soft.open .cj-dd-btn {
    border-color: var(--cj-electric);
    border-bottom-color: transparent;
    border-radius: var(--cj-r) var(--cj-r) 0 0;
    box-shadow: none;
}

body:not(.dark) .cj-dd.open .cj-dd-btn {
    background: #fff;
}

body.dark .cj-dd.open .cj-dd-btn {
    border-bottom-color: rgba(255,255,255,.2);
}

.cj-dd.open .cj-dd-btn svg {
    transform: rotate(180deg);
}

.cj-dd.dis .cj-dd-btn {
    opacity: .55;
    cursor: default;
}

.cj-dd-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1.5px solid var(--cj-electric);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 18px 40px rgba(11,13,46,.14);
    max-height: 280px;
    overflow: auto;
    z-index: 60;
}

.cj-dd.open .cj-dd-menu {
    display: block;
}

.cj-dd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 8px;
    color: #00015D;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

    .cj-dd-item.act {
        background: #E2F5EF;
    }

    .cj-dd-item.sel {
        font-weight: 700;
    }

        .cj-dd-item.sel::after {
            content: "";
            flex: none;
            width: 14px;
            height: 8px;
            border-left: 2px solid #007561;
            border-bottom: 2px solid #007561;
            transform: rotate(-45deg) translate(2px, -2px);
        }

    .cj-dd-item.dis {
        opacity: .45;
        cursor: default;
    }
/* dark: dark field, the menu stays white (brand) */
body.dark .cj-dd-btn {
    border-color: var(--cj-input);
}

    body.dark .cj-dd.open .cj-dd-btn, body.dark .cj-dd-btn:hover, body.dark .cj-dd-btn:focus-visible {
        border-color: #fff;
    }

body.dark .cj-dd-menu {
    border-color: #fff;
    box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

/* segmented control:  <div class="cj-seg"><button class="on">…</button>…</div> */
.cj-seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 11px;
    background: var(--cj-s2);
    border: 1px solid transparent;
    box-shadow: var(--cj-shadow-1);
}

body.dark .cj-seg {
    background: var(--cj-s1);
    border-color: var(--cj-line);
}

.cj-seg > button {
    height: 30px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--cj-t3);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

    .cj-seg > button i {
        font-size: 14px;
    }

    .cj-seg > button:hover {
        color: var(--cj-accent);
    }

    .cj-seg > button.on {
        background: var(--cj-electric);
        color: #fff;
    }

        .cj-seg > button.on i {
            color: var(--cj-neon-raw);
        }

    .cj-seg > button .cj-cnt {
        font-size: 11px;
        opacity: .75;
        font-weight: 700;
    }

/* chips */
.cj-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 9px;
    border-radius: 7px;
    background: var(--cj-s3);
    color: var(--cj-t2);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

    .cj-chip.line {
        background: transparent;
        border: 1px solid var(--cj-line-2);
    }

    .cj-chip.el {
        background: var(--cj-electric);
        color: #fff;
    }

    .cj-chip.teal {
        background: var(--cj-hover);
        color: var(--cj-teal-ink);
    }

body.dark .cj-chip.teal {
    background: rgba(0,255,195,.12);
    color: var(--cj-neon-raw);
}

.cj-chip.ok {
    background: rgba(31,191,64,.12);
    color: var(--cj-success-t);
}

.cj-chip.warn {
    background: var(--cj-warn-bg);
    color: var(--cj-warn-t);
}

/* avatars */
.cj-av {
    width: 30px;
    height: 30px;
    flex: none;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid var(--cj-s2);
    font-size: 11px;
    font-weight: 800;
    color: var(--cj-dark-blue);
    letter-spacing: .02em;
    object-fit: cover;
}

.cj-av-stack {
    display: flex;
    align-items: center;
}

    .cj-av-stack > * + * {
        margin-inline-start: -8px;
    }

/* cards */
.cj-card {
    position: relative;
    background: var(--cj-s2);
    border-radius: var(--cj-r-lg);
    box-shadow: var(--cj-shadow-1);
}

/* progress bar */
.cj-pbar {
    flex: 1;
    height: 6px;
    border-radius: 6px;
    background: var(--cj-s4);
    overflow: hidden;
}

    .cj-pbar > i {
        display: block;
        height: 100%;
        border-radius: 6px;
        background: var(--cj-bar);
        box-shadow: var(--cj-bar-glow);
    }

/* ==========================================================================
   MODALS — Bootstrap .modal inside .cj-modal / .coject-modal / .portal_modal
   ========================================================================== */
body.cj-body .modal-backdrop.show {
    background: var(--cj-dark-blue);
    opacity: .34;
}

body.cj-body.dark .modal-backdrop.show {
    opacity: .72;
}

.cj-modal .modal-content,
body.cj-body .coject-modal .modal-content,
body.cj-body .portal_modal .modal-content {
    min-height: 0 !important;
    padding: 0 !important;
    background: var(--cj-s2);
    color: var(--cj-t1);
    border: 1px solid var(--cj-line-2);
    border-radius: var(--cj-r-xl);
    box-shadow: 0 40px 90px rgba(11,13,46,.28);
    overflow: hidden;
}

body.cj-body.dark .cj-modal .modal-content,
body.cj-body.dark .coject-modal .modal-content,
body.cj-body.dark .portal_modal .modal-content {
    background: var(--cj-s1);
}

body.cj-body .cj-modal .modal-header,
body.cj-body .coject-modal .modal-header,
body.cj-body .portal_modal .modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 22px 26px 0 !important;
    border: 0;
}

    body.cj-body .cj-modal .modal-header h1,
    body.cj-body .cj-modal .modal-header h2,
    body.cj-body .coject-modal .modal-header h1,
    body.cj-body .portal_modal .modal-header h1 {
        margin: 0;
        font-size: 23px;
        font-weight: 700;
        color: var(--cj-title);
    }

    body.cj-body .cj-modal .modal-header > div {
        margin: 0 !important;
    }

body.cj-body .cj-modal .btn-close,
body.cj-body .coject-modal .btn-close,
body.cj-body .portal_modal .btn-close {
    width: 38px;
    height: 38px;
    margin: 0 !important;
    margin-inline-start: auto !important;
    padding: 0;
    display: grid;
    place-items: center;
    background: none;
    border-radius: var(--cj-r);
    opacity: 1;
    color: var(--cj-t2);
    font-size: 16px;
}

    body.cj-body .cj-modal .btn-close:hover,
    body.cj-body .coject-modal .btn-close:hover {
        background: var(--cj-hover);
        color: var(--cj-accent);
    }

    body.cj-body .cj-modal .btn-close i, body.cj-body .coject-modal .btn-close i {
        color: inherit !important;
    }

body.cj-body .cj-modal .modal-body,
body.cj-body .coject-modal .modal-content .modal-body,
body.cj-body .portal_modal .modal-content .modal-body {
    padding: 20px 26px 22px !important;
    display: block;
}

body.cj-body .cj-modal .modal-footer,
body.cj-body .coject-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    padding: 16px 26px;
    border-top: 1px solid var(--cj-line);
    background: #F7F8FC;
}

body.cj-body.dark .cj-modal .modal-footer,
body.cj-body.dark .coject-modal .modal-footer {
    background: rgba(11,13,46,.5);
}

body.cj-body .cj-modal .modal-footer > * {
    margin: 0;
}

.cj-modal-sub {
    font-size: 14px;
    color: var(--cj-t3);
    margin: -12px 0 16px !important;
}

/* legacy form controls inside the new shell (coject.css) */
body.cj-body .coject-form {
    gap: 0;
}

body.cj-body .modal-body > .form-row + .form-row,
body.cj-body .modal-body > .form-row + .form-row-colums,
body.cj-body .modal-body > .form-row-colums + .form-row,
body.cj-body .modal-body > .form-row-colums + .form-row-colums {
    margin-top: 18px;
}

body.cj-body .coject-form .form-row-horizontal + .form-row-horizontal {
    margin-top: 16px;
}

body.cj-body .coject-form .form-row,
body.cj-body .coject-form .form-row-colums {
    margin: 0;
}

body.cj-body .coject-form .form-row-colums {
    gap: 16px;
    align-items: flex-start;
}

body.cj-body .coject-form .label-form,
body.cj-body .coject-form .coject-label.cj-lbl,
body.cj-body .cj-lbl {
    width: auto;
    margin: 0 0 7px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--cj-t2);
}

    body.cj-body .coject-form .label-form i {
        color: var(--cj-t4);
        font-size: 12px;
        cursor: help;
    }

body.cj-body .coject-input,
body.cj-body .coject-textarea {
    height: 40px;
    width: 100%;
    padding: 0 13px;
    border: 1.5px solid var(--cj-input) !important;
    border-radius: var(--cj-r);
    background-color: var(--cj-input-bg) !important;
    color: var(--cj-t1) !important;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}

body.cj-body textarea.coject-input, body.cj-body .coject-textarea {
    height: auto;
    min-height: 84px;
    padding: 11px 13px;
    line-height: 1.55;
}

body.cj-body .coject-input::placeholder {
    color: var(--cj-t4);
}

body.cj-body .coject-input:hover {
    border-color: var(--cj-accent) !important;
}

body.cj-body .coject-input:focus {
    border-color: var(--cj-accent) !important;
    box-shadow: 0 0 0 3px var(--cj-focus);
    outline: 0;
}

body.cj-body .coject-input.error {
    border-color: var(--cj-danger-b) !important;
}

body.cj-body span.error {
    display: block;
    padding: 6px 2px 0 !important;
    font-size: 12px;
    font-weight: 700;
    color: var(--cj-danger) !important;
    background: none;
}

body.cj-body select.coject-select {
    height: 40px;
    padding: 0 38px 0 14px;
    border: 1.5px solid var(--cj-input) !important;
    border-radius: var(--cj-r);
    background-color: var(--cj-input-bg) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23596285' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    color: var(--cj-t1) !important;
    font-size: 13.5px;
    font-weight: 700;
}

[dir="rtl"] body.cj-body select.coject-select, body.cj-body[dir="rtl"] select.coject-select {
    padding: 0 14px 0 38px;
    background-position: left 12px center;
}

body.cj-body .coject-select option {
    background: #fff;
    color: var(--cj-electric);
}

/* Kendo DropDownList built on a .coject-select */
body.cj-body .k-dropdown.coject-select,
body.cj-body span.k-widget.k-dropdown {
    height: 40px;
    padding: 0 !important;
    width: 100%;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

body.cj-body .k-dropdown .k-dropdown-wrap {
    height: 40px;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--cj-input) !important;
    border-radius: var(--cj-r) !important;
    background: var(--cj-input-bg) !important;
    color: var(--cj-t1) !important;
    box-shadow: none !important;
}

    body.cj-body .k-dropdown .k-dropdown-wrap.k-state-focused,
    body.cj-body .k-dropdown .k-dropdown-wrap:hover {
        border-color: var(--cj-accent) !important;
    }

body.cj-body .k-dropdown .k-input {
    padding: 0 14px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--cj-t1);
    background: none;
    line-height: 37px;
    height: 37px;
}

body.cj-body .k-dropdown .k-select {
    display: grid !important;
    place-items: center;
    width: 36px;
    border: 0;
    background: none;
    color: var(--cj-t3);
}

body.cj-body .k-animation-container .k-popup.k-list-container {
    padding: 6px;
    border: 1.5px solid var(--cj-electric) !important;
    border-radius: 0 0 12px 12px;
    background: #fff !important;
    box-shadow: var(--cj-shadow-menu);
}

body.cj-body .k-animation-container ul.k-list {
    background: #fff !important;
    color: var(--cj-electric) !important;
}

body.cj-body .k-animation-container .k-list .k-item {
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--cj-electric);
    font-size: 13.5px;
}

    body.cj-body .k-animation-container .k-list .k-item.k-state-hover,
    body.cj-body .k-animation-container .k-list .k-item:hover {
        background: #E2F5EF;
        color: var(--cj-electric);
    }

    body.cj-body .k-animation-container .k-list .k-item.k-state-selected {
        background: #E2F5EF;
        color: var(--cj-electric);
        font-weight: 700;
    }

body.cj-body .k-list-scroller {
    border-top: 0 !important;
}

/* radio chips:  <ul class="coject-radio-group"><li><input type=radio><label/></li></ul> */
body.cj-body .coject-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

    body.cj-body .coject-radio-group li {
        position: relative;
        display: block;
        margin: 0;
    }

    body.cj-body .coject-radio-group input[type="radio"] {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        opacity: 0;
        cursor: pointer;
        z-index: 1;
    }

    body.cj-body .coject-radio-group label {
        margin: 0 !important;
        height: 36px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 0 14px;
        border: 1.5px solid var(--cj-line-2);
        border-radius: var(--cj-r);
        background: var(--cj-input-bg);
        color: var(--cj-t2);
        font-size: 13px;
        font-weight: 700;
        line-height: 1;
        transition: border-color .15s, background .15s, color .15s;
    }

        body.cj-body .coject-radio-group label::before {
            content: "";
            width: 14px;
            height: 14px;
            flex: none;
            border: 1.5px solid var(--cj-input);
            border-radius: 50%;
            background: var(--cj-input-bg);
            transition: border-color .15s, box-shadow .15s;
        }

    body.cj-body .coject-radio-group li:hover label {
        border-color: var(--cj-input);
        color: var(--cj-accent);
    }

    body.cj-body .coject-radio-group input:checked + label {
        border-color: var(--cj-electric);
        background: var(--cj-hover);
        color: var(--cj-title);
    }

        body.cj-body .coject-radio-group input:checked + label::before {
            border-color: var(--cj-check);
            box-shadow: inset 0 0 0 3px var(--cj-input-bg), inset 0 0 0 8px var(--cj-check);
        }

    body.cj-body .coject-radio-group input:focus-visible + label {
        outline: 2px solid var(--cj-teal);
        outline-offset: 2px;
    }

    body.cj-body .coject-radio-group input:disabled + label {
        opacity: .45;
    }

body.dark .coject-radio-group input:checked + label {
    border-color: var(--cj-neon-raw);
    background: rgba(0,255,195,.08);
}

/* switch (.coject-switch) */
body.cj-body .coject-switch {
    width: 42px;
    height: 24px;
}

    body.cj-body .coject-switch .slider {
        border: 1.5px solid var(--cj-input);
        background-color: var(--cj-s3) !important;
    }

        body.cj-body .coject-switch .slider:before {
            width: 16px;
            height: 16px;
            left: 3px;
            background: var(--cj-t3);
        }

    body.cj-body .coject-switch input:checked + .slider {
        background-color: var(--cj-teal) !important;
        border-color: var(--cj-teal);
    }

        body.cj-body .coject-switch input:checked + .slider:before {
            background: #fff;
            transform: translate(17px, -50%);
        }

/* legacy big white button → primary */
body.cj-body .coject-button.cj-btn {
    height: 40px;
    min-width: 0;
    border-radius: var(--cj-r);
    font-size: 14px;
}

/* ==========================================================================
   LOADER / SKELETON
   ========================================================================== */
body.cj-body #divLoading.cj-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(255,255,255,.6);
    opacity: 1;
    backdrop-filter: blur(2px);
}

body.cj-body.dark #divLoading.cj-loader {
    background: rgba(11,13,46,.6);
}

body.cj-body #divLoading.cj-loader::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    border-radius: 50%;
    border: 3px solid rgba(9,200,149,.25);
    border-top-color: var(--cj-teal);
    animation: cj-spin .8s linear infinite;
}

@keyframes cj-spin {
    to {
        transform: rotate(360deg);
    }
}

body.cj-body .skeleton,
body.cj-body .skeleton-inline {
    color: transparent !important;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--cj-s3) 0%, var(--cj-s4) 50%, var(--cj-s3) 100%) !important;
    background-size: 200% 100% !important;
    animation: cj-shimmer 1.3s linear infinite;
}

@keyframes cj-shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
    .cj-gsearch {
        display: none;
    }
}

@media (max-width: 900px) {
    .cj-page {
        padding: 22px 18px 32px;
    }

    .cj-app .cj-top {
        padding-inline: 16px 12px;
    }

    .cj-btn p {
        display: none;
    }

    .cj-status .cj-st:not(.cj-st-c):not(:first-child) {
        display: none;
    }
}

@media (max-width: 767px) {
    /* phones: sidebar always in its compact form */
    #sideMenu.cj-side, #sideMenu.cj-side:not(.closed) {
        width: var(--cj-side-w-closed);
    }

    #sideMenu .cj-logo {
        padding: 0;
        justify-content: center;
    }

        #sideMenu .cj-logo .cj-logo-full {
            display: none !important;
        }

        #sideMenu .cj-logo .cj-logo-ico.light-only {
            display: block !important;
        }

    #sideMenu .cj-nav li > a {
        justify-content: center;
        padding: 0;
        width: 46px;
        height: 42px;
    }

        #sideMenu .cj-nav li > a span, #sideMenu .cj-nav-h, #sideMenu .cj-help-box, #sideMenu .cj-nav-btn span, #sideMenu .cj-proj-chip > div {
            display: none;
        }

    #sideMenu .cj-side-scroll {
        padding: 10px 12px;
    }

    #sideMenu .cj-nav-btn {
        display: none;
    }

    .cj-page-h h1 {
        font-size: 24px;
    }

    .cj-status .cj-st-c {
        font-size: 10.5px;
    }
}
