/* Cassian deployment-node boundary cues.
   Red and Black modes must be visible everywhere because they identify the
   operational enclave of this Cassian instance, not just a page-level theme. */

body.cassian-deployment-red {
    --cassian-deployment-accent: #dc2626;
    --cassian-deployment-accent-strong: #7f1d1d;
    --cassian-deployment-accent-soft: rgba(220, 38, 38, 0.18);
    --cassian-deployment-accent-halo: rgba(248, 113, 113, 0.34);
    --cassian-deployment-contrast: #ffffff;
    --cassian-deployment-surface: #16090d;
    --cassian-deployment-border: rgba(248, 113, 113, 0.58);
}

body.cassian-deployment-black {
    --cassian-deployment-accent: #020617;
    --cassian-deployment-accent-strong: #000000;
    --cassian-deployment-accent-soft: rgba(15, 23, 42, 0.34);
    --cassian-deployment-accent-halo: rgba(203, 213, 225, 0.34);
    --cassian-deployment-contrast: #f8fafc;
    --cassian-deployment-surface: #020617;
    --cassian-deployment-border: rgba(203, 213, 225, 0.62);
}

/* Isolation-node boundary frame — a thin red/black border around the whole
   viewport so the operating enclave is unmistakable on every screen. Red mode
   shows a red frame; Black mode a near-black frame with a faint light inner edge
   so it stays visible on the dark UI. */
body.cassian-deployment-red::before,
body.cassian-deployment-black::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1095;
    pointer-events: none;
    border: 3px solid var(--cassian-deployment-accent);
    box-shadow: inset 0 0 0 1px var(--cassian-deployment-border), inset 0 0 22px var(--cassian-deployment-accent-halo);
}

/* Isolation-node label — a centered pill at the very top of the screen (moved
   off the left edge so it reads as a header banner, not a side rail). */
.cassian-deployment-edge-label {
    position: fixed;
    top: 6px;
    left: 50%;
    z-index: 1097;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border: 1px solid var(--cassian-deployment-border);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cassian-deployment-surface), rgba(10, 16, 41, 0.92));
    color: var(--cassian-deployment-contrast);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38), 0 0 18px var(--cassian-deployment-accent-halo);
    pointer-events: none;
    white-space: nowrap;
}

/* The header-embedded chip is now redundant with the top-center label above. */
.cassian-deployment-chip {
    display: none !important;
}

.cassian-deployment-edge-label span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.cassian-deployment-edge-label strong {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.78);
}

body.cassian-deployment-red #kt_header,
body.cassian-deployment-red #kt_app_header,
body.cassian-deployment-red .app-header,
body.cassian-deployment-red .header,
body.cassian-deployment-black #kt_header,
body.cassian-deployment-black #kt_app_header,
body.cassian-deployment-black .app-header,
body.cassian-deployment-black .header {
    border-top: 0;
    box-shadow: inset 0 -4px 0 var(--cassian-deployment-accent), 0 10px 22px rgba(0, 0, 0, 0.18);
}

body.cassian-deployment-black #kt_header,
body.cassian-deployment-black #kt_app_header,
body.cassian-deployment-black .app-header,
body.cassian-deployment-black .header {
    box-shadow: inset 0 -4px 0 #020617, inset 0 -6px 0 rgba(203, 213, 225, 0.48), 0 10px 22px rgba(0, 0, 0, 0.2);
}

body.cassian-deployment-red .subheader,
body.cassian-deployment-red #kt_toolbar,
body.cassian-deployment-red .app-toolbar,
body.cassian-deployment-black .subheader,
body.cassian-deployment-black #kt_toolbar,
body.cassian-deployment-black .app-toolbar {
    border-bottom: 2px solid var(--cassian-deployment-accent);
}

body.cassian-deployment-black .subheader,
body.cassian-deployment-black #kt_toolbar,
body.cassian-deployment-black .app-toolbar {
    border-bottom-color: #020617;
    box-shadow: inset 0 -2px 0 rgba(203, 213, 225, 0.42);
}

body.cassian-deployment-red #kt_aside,
body.cassian-deployment-red #kt_app_sidebar,
body.cassian-deployment-black #kt_aside,
body.cassian-deployment-black #kt_app_sidebar {
    box-shadow: inset -4px 0 0 var(--cassian-deployment-accent);
}

body.cassian-deployment-black #kt_aside,
body.cassian-deployment-black #kt_app_sidebar {
    box-shadow: inset -4px 0 0 #020617, inset -6px 0 0 rgba(203, 213, 225, 0.42);
}

.cassian-deployment-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin-right: 12px;
    padding: 6px 12px;
    border: 1px solid var(--cassian-deployment-border);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--cassian-deployment-surface), rgba(10, 16, 41, 0.9));
    color: var(--cassian-deployment-contrast);
    box-shadow: 0 0 16px var(--cassian-deployment-accent-halo);
    white-space: nowrap;
}

.cassian-deployment-chip__light {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--cassian-deployment-accent);
    box-shadow: 0 0 10px var(--cassian-deployment-accent-halo);
}

.cassian-deployment-chip--black .cassian-deployment-chip__light {
    background: #f8fafc;
}

.cassian-deployment-chip__mode {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.cassian-deployment-chip__copy {
    font-size: 11px;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.76);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cassian-deployment-mobile-chip {
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--cassian-deployment-border);
    border-radius: 999px;
    background: var(--cassian-deployment-surface);
    color: var(--cassian-deployment-contrast);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    box-shadow: 0 0 14px var(--cassian-deployment-accent-halo);
}

body.cassian-deployment-red .cassian-scope-bar,
body.cassian-deployment-black .cassian-scope-bar {
    border-left: 4px solid var(--cassian-deployment-accent);
    box-shadow: inset 0 0 0 1px var(--cassian-deployment-accent-soft);
}

body.cassian-deployment-black .cassian-scope-bar {
    border-left-color: #020617;
    box-shadow: inset 2px 0 0 rgba(203, 213, 225, 0.48), inset 0 0 0 1px var(--cassian-deployment-accent-soft);
}

body.cassian-deployment-red .cassian-configuration-baselines,
body.cassian-deployment-red .cassian-trust-services,
body.cassian-deployment-red .cassian-compliance,
body.cassian-deployment-red .designer-standalone,
body.cassian-deployment-red .cassian_list_data,
body.cassian-deployment-red .device_manegment_details,
body.cassian-deployment-black .cassian-configuration-baselines,
body.cassian-deployment-black .cassian-trust-services,
body.cassian-deployment-black .cassian-compliance,
body.cassian-deployment-black .designer-standalone,
body.cassian-deployment-black .cassian_list_data,
body.cassian-deployment-black .device_manegment_details {
    position: relative;
}

body.cassian-deployment-red .cassian-configuration-baselines::before,
body.cassian-deployment-red .cassian-trust-services::before,
body.cassian-deployment-red .cassian-compliance::before,
body.cassian-deployment-red .designer-standalone::before,
body.cassian-deployment-red .cassian_list_data::before,
body.cassian-deployment-red .device_manegment_details::before,
body.cassian-deployment-black .cassian-configuration-baselines::before,
body.cassian-deployment-black .cassian-trust-services::before,
body.cassian-deployment-black .cassian-compliance::before,
body.cassian-deployment-black .designer-standalone::before,
body.cassian-deployment-black .cassian_list_data::before,
body.cassian-deployment-black .device_manegment_details::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    width: 4px;
    border-radius: 999px;
    background: var(--cassian-deployment-accent);
    box-shadow: 0 0 16px var(--cassian-deployment-accent-halo);
    pointer-events: none;
}

body.cassian-deployment-black .cassian-configuration-baselines::before,
body.cassian-deployment-black .cassian-trust-services::before,
body.cassian-deployment-black .cassian-compliance::before,
body.cassian-deployment-black .designer-standalone::before,
body.cassian-deployment-black .cassian_list_data::before,
body.cassian-deployment-black .device_manegment_details::before {
    background: linear-gradient(180deg, #020617 0%, #020617 72%, rgba(203, 213, 225, 0.78) 100%);
}

body.cassian-deployment-red .cassian-configuration-baselines .cassian-card,
body.cassian-deployment-red .cassian-trust-services .cassian-card,
body.cassian-deployment-red .cassian-compliance .compliance-panel,
body.cassian-deployment-red .cassian-compliance .compliance-chart-card,
body.cassian-deployment-red .designer-standalone #network-designer-root,
body.cassian-deployment-red .nd-shell,
body.cassian-deployment-black .cassian-configuration-baselines .cassian-card,
body.cassian-deployment-black .cassian-trust-services .cassian-card,
body.cassian-deployment-black .cassian-compliance .compliance-panel,
body.cassian-deployment-black .cassian-compliance .compliance-chart-card,
body.cassian-deployment-black .designer-standalone #network-designer-root,
body.cassian-deployment-black .nd-shell {
    border-color: var(--cassian-deployment-border) !important;
    box-shadow: inset 4px 0 0 var(--cassian-deployment-accent), 0 0 0 1px var(--cassian-deployment-accent-soft);
}

body.cassian-deployment-black .cassian-configuration-baselines .cassian-card,
body.cassian-deployment-black .cassian-trust-services .cassian-card,
body.cassian-deployment-black .cassian-compliance .compliance-panel,
body.cassian-deployment-black .cassian-compliance .compliance-chart-card,
body.cassian-deployment-black .designer-standalone #network-designer-root,
body.cassian-deployment-black .nd-shell {
    box-shadow: inset 4px 0 0 #020617, inset 6px 0 0 rgba(203, 213, 225, 0.42), 0 0 0 1px var(--cassian-deployment-accent-soft);
}

body.cassian-deployment-red .nd-toolbar,
body.cassian-deployment-black .nd-toolbar {
    border-bottom-color: var(--cassian-deployment-border);
}

body.cassian-deployment-red .nd-toolbar::before,
body.cassian-deployment-black .nd-toolbar::before {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    border: 1px solid var(--cassian-deployment-border);
    border-radius: 999px;
    background: var(--cassian-deployment-surface);
    color: var(--cassian-deployment-contrast);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    box-shadow: 0 0 14px var(--cassian-deployment-accent-halo);
    white-space: nowrap;
}

body.cassian-deployment-red .nd-toolbar::before {
    content: "RED NODE";
}

body.cassian-deployment-black .nd-toolbar::before {
    content: "BLACK NODE";
}

.cassian-access {
    position: relative;
}

.cassian-login-boundary-ribbon {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 5;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 38px;
    padding: 7px 16px;
    border: 1px solid var(--cassian-deployment-border);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cassian-deployment-surface), rgba(10, 16, 41, 0.9));
    color: var(--cassian-deployment-contrast);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 18px var(--cassian-deployment-accent-halo);
    white-space: nowrap;
}

.cassian-login-boundary-ribbon__mode,
.cassian-login-boundary-card__mode {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.cassian-login-boundary-ribbon__copy,
.cassian-login-boundary-card__copy {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.78);
}

.cassian-login-boundary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
    padding: 10px 12px;
    border: 1px solid var(--cassian-deployment-border);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cassian-deployment-accent-soft), rgba(10, 16, 41, 0.72));
    color: var(--cassian-deployment-contrast);
    box-shadow: inset 4px 0 0 var(--cassian-deployment-accent), 0 0 18px var(--cassian-deployment-accent-halo);
}

.cassian-login-boundary-card--black {
    box-shadow: inset 4px 0 0 #020617, inset 6px 0 0 rgba(203, 213, 225, 0.44), 0 0 18px var(--cassian-deployment-accent-halo);
}

body.cassian-deployment-red .cassian-access .cassian-login-card,
body.cassian-deployment-black .cassian-access .cassian-login-card {
    border-color: var(--cassian-deployment-border) !important;
    box-shadow: inset 4px 0 0 var(--cassian-deployment-accent), 0 28px 56px rgba(0, 0, 0, 0.55), 0 0 24px var(--cassian-deployment-accent-halo) !important;
}

body.cassian-deployment-black .cassian-access .cassian-login-card {
    box-shadow: inset 4px 0 0 #020617, inset 6px 0 0 rgba(203, 213, 225, 0.44), 0 28px 56px rgba(0, 0, 0, 0.55), 0 0 24px var(--cassian-deployment-accent-halo) !important;
}

body.cassian-deployment-red .cassian-network-status,
body.cassian-deployment-black .cassian-network-status {
    border-color: var(--cassian-deployment-border);
    box-shadow: 0 0 18px var(--cassian-deployment-accent-halo);
}

body.cassian-deployment-red .cassian-network-status-dot {
    background: #ef4444;
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.8);
}

body.cassian-deployment-black .cassian-network-status-dot {
    background: #f8fafc;
    box-shadow: 0 0 12px rgba(226, 232, 240, 0.8);
}

@media (max-width: 991.98px) {
    /* On narrow screens the header mobile chip is the boundary indicator, so the
       top-center pill is hidden to avoid duplication. */
    .cassian-deployment-edge-label {
        display: none;
    }

    body.cassian-deployment-red .cassian-configuration-baselines::before,
    body.cassian-deployment-red .cassian-trust-services::before,
    body.cassian-deployment-red .cassian-compliance::before,
    body.cassian-deployment-red .designer-standalone::before,
    body.cassian-deployment-red .cassian_list_data::before,
    body.cassian-deployment-red .device_manegment_details::before,
    body.cassian-deployment-black .cassian-configuration-baselines::before,
    body.cassian-deployment-black .cassian-trust-services::before,
    body.cassian-deployment-black .cassian-compliance::before,
    body.cassian-deployment-black .designer-standalone::before,
    body.cassian-deployment-black .cassian_list_data::before,
    body.cassian-deployment-black .device_manegment_details::before {
        left: 0;
        top: -8px;
        right: 0;
        bottom: auto;
        width: auto;
        height: 4px;
    }

    .cassian-login-boundary-ribbon {
        left: 12px;
        right: 12px;
        transform: none;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .cassian-login-boundary-ribbon__copy {
        display: none;
    }

    .cassian-login-boundary-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

/* UX-LAYOUT-001 full-bleed (global, MANDATORY for ALL screens). Every Cassian
   screen must use the full content width — no centered fixed/xxl container, no
   right gutter on wide displays, controls reach the viewport edges. Metronic's
   content-wrapper chain (#kt_content / #kt_content_container / .app-container)
   and the standard Cassian page wrappers (.cassian_list_data and per-feature
   roots) are all forced to 100% width with their auto-centering margins removed.
   Covers both Metronic 7 (#kt_content*) and Metronic 8 (#kt_app_content*) ids.
   See the Cassian UI/UX Product Experience Standard §6.5 (UX-LAYOUT-001). */
#kt_content,
#kt_content_container,
#kt_app_content,
#kt_app_content_container,
.content,
.app-content,
.app-container,
.cassian_list_data,
.policy_management {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* The remaining right/left gutter is the content container's horizontal padding
   (Metronic default), not a max-width — keep a slim, even breathing margin so
   cards/tables don't butt against the chrome but still reach the edges. */
#kt_content_container,
#kt_app_content_container {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* UX-TOPBAR-001 — aside footer utility cluster (language / notifications / user).
   These render stacked in the narrow aside footer (.QuantumIryxAI_header_menu).
   (1) Center the cluster as an even flex column so the flag, bell and avatar
       line up on the same vertical axis with consistent spacing.
   (2) The unread-count badge ships with `translate-middle` but WITHOUT the
       Bootstrap position anchors (position-absolute/top/start), so it drifts off
       the bell and renders as a low-contrast yellow `badge-warning`. Anchor it to
       the bell's top-right and give it a high-contrast fill + ring so the count
       is clearly legible on the dark aside. */
.QuantumIryxAI_header_menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
/* Center the trigger wrappers (language flag, notification bell, user avatar)
   only — NOT the floating Metronic dropdown menu, which is also a direct child
   here (<div class="menu menu-sub menu-sub-dropdown">). Forcing display:flex on
   that menu mangles its item layout and clips it inside the narrow aside. */
.QuantumIryxAI_header_menu > div:not(.menu) {
    margin-bottom: 0 !important;
    display: flex;
    justify-content: center;
}
/* Language switcher dropdown: the trigger now attaches its menu to <body> and
   opens to the right (see AppLanguageSwitch/Default.cshtml), so it clears the
   narrow aside entirely. Belt-and-braces: let the aside footer overflow, and
   keep the body-attached menu above the aside's stacking context. */
.QuantumIryxAI_header_menu,
.QuantumIryxAI_header_menu .dropdown-language {
    overflow: visible !important;
}
body > .menu.menu-sub-dropdown.show {
    z-index: 1060 !important;
}
#header_notification_bar .unread-notification-count {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    transform: translate(45%, -35%);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: #f5365c !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    border: 2px solid var(--cassian-sidebar-panel, #0b1437);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
    z-index: 2;
}
