/* DGxOS Command Center — clean chat area only */

.dgx-conversation {
    height: 400px;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 0%, rgba(124,58,237,.16), transparent 35%),
        rgba(8,13,26,.88);
    border: 1px solid rgba(125,211,252,.14);
}

.dgx-brain-clean[data-mission-active="true"] .dgx-conversation {
    height: 500px;
}

.dgx-conversation-header {
    flex: 0 0 82px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(148,163,184,.12);
}

.dgx-conversation-header h2 {
    margin: 4px 0;
    font-size: 22px;
}

.dgx-conversation-header p {
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

.dgx-live-intent {
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(124,58,237,.24);
    color: #c4b5fd;
    font-weight: 800;
}

.dgx-conversation-stream {
    flex: 1;
    padding: 18px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* true chat bubbles */
.dgx-conversation-stream .dgx-user-message,
.dgx-conversation-stream .dgx-system-message {
    width: auto;
    min-width: unset;
    max-width: 560px;
    min-height: unset;
    height: auto;
    padding: 12px 16px;
    margin: 0;
    border-radius: 18px;
    line-height: 1.42;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: break-word;
    text-align: left;
    animation: dgxMessageIn .22s ease-out both;
}

.dgx-conversation-stream .dgx-user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #3b82f6, #7c3aed);
    color: white;
    box-shadow: 0 12px 28px rgba(37,99,235,.24);
}

.dgx-conversation-stream .dgx-system-message {
    align-self: flex-start;
    background: rgba(20,30,50,.92);
    color: #e5e7eb;
    border: 1px solid rgba(148,163,184,.12);
    box-shadow: 0 12px 28px rgba(0,0,0,.22);
}

.dgx-conversation-stream .dgx-user-message strong,
.dgx-conversation-stream .dgx-system-message strong {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #93c5fd;
}

/* intro watermark */
.dgx-conversation-stream .dgx-system-message:first-child {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 4px 0 10px 4px;
    color: rgba(226,232,240,.72);
    max-width: 520px;
}

.dgx-conversation-stream .dgx-system-message:first-child strong {
    color: rgba(125,211,252,.78);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* composer */
.dgx-command-composer {
    flex: 0 0 68px;
    margin: 0 22px 18px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 22px;
    background: rgba(3,7,18,.84);
    border: 1px solid rgba(96,165,250,.28);
    box-shadow: 0 18px 44px rgba(0,0,0,.28);
}

.dgx-command-composer::before {
    content: "⌘";
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(15,23,42,.9);
    color: #cbd5e1;
    font-size: 24px;
}

.dgx-command-composer #observations {
    flex: 1;
    height: 44px;
    min-height: 44px;
    max-height: 110px;
    resize: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f8fafc;
    font-size: 16px;
    line-height: 1.4;
    padding: 11px 6px;
}

.dgx-command-composer #observations::placeholder {
    color: #8b95a7;
}

#brainSend {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border: 0;
    border-radius: 17px;
    color: white;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(135deg, #38bdf8, #2563eb, #7c3aed);
    box-shadow: 0 16px 34px rgba(37,99,235,.34);
}

#brainSend:disabled,
.dgx-command-composer #observations:disabled {
    cursor: wait;
    opacity: .62;
}

.dgx-brain-runtime-panel {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid rgba(77, 198, 241, .12);
    border-radius: 8px;
    background: rgba(5, 13, 24, .58);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.025),
        0 14px 34px rgba(0,0,0,.12);
}

.dgx-brain-runtime-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.dgx-brain-runtime-head span,
.dgx-brain-runtime-grid span {
    display: block;
    margin-bottom: 4px;
    color: rgba(141, 193, 221, .68);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.dgx-brain-runtime-head strong {
    display: block;
    color: rgba(236, 249, 255, .95);
    font-size: 13px;
    line-height: 1.3;
}

.dgx-brain-runtime-head small {
    flex: 0 0 auto;
    color: rgba(125, 211, 252, .78);
    font-size: 11px;
    font-weight: 760;
}

.dgx-brain-runtime-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.dgx-brain-runtime-grid section {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(89, 195, 234, .08);
    border-radius: 8px;
    background: rgba(3, 12, 22, .38);
}

.dgx-brain-runtime-grid strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: rgba(226, 242, 252, .9);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dgx-brain-runtime-timeline {
    display: grid;
    gap: 6px;
    max-height: 128px;
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}

.dgx-brain-runtime-timeline li {
    display: grid;
    grid-template-columns: 72px 160px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-width: 0;
    color: rgba(203, 213, 225, .82);
    font-size: 11px;
    line-height: 1.35;
}

.dgx-brain-runtime-timeline time,
.dgx-brain-runtime-timeline span {
    color: rgba(125, 211, 252, .66);
    font-variant-numeric: tabular-nums;
}

.dgx-brain-runtime-timeline strong {
    min-width: 0;
    overflow: hidden;
    color: rgba(241, 245, 249, .9);
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dgx-mission-map-panel {
    display: block;
    margin-top: 18px;
    scroll-margin-top: 18px;
}

@keyframes dgxMessageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* v22 — immersive conversation state */
.dgx-conversation-stream.has-user-message > .dgx-system-message:first-child {
    opacity: 0;
    transform: translateY(-14px);
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
    transition:
        opacity .28s ease,
        transform .28s ease,
        max-height .28s ease,
        margin .28s ease,
        padding .28s ease;
}

.dgx-conversation-stream > .dgx-system-message:first-child {
    transition:
        opacity .28s ease,
        transform .28s ease,
        max-height .28s ease,
        margin .28s ease,
        padding .28s ease;
}

.dgx-user-message {
    padding: 13px 17px;
}

.dgx-user-message strong {
    display: none;
}


/* v23 — direct canvas conversation, no heavy chat cards */
.dgx-conversation-stream .dgx-user-message,
.dgx-conversation-stream .dgx-system-message {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-width: 620px;
}

.dgx-conversation-stream .dgx-user-message {
    color: #f8fafc;
    text-align: right;
    padding: 10px 14px;
    border-right: 3px solid rgba(124, 58, 237, .85);
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, .10));
}

.dgx-conversation-stream .dgx-system-message {
    color: #e5e7eb;
    padding: 10px 14px;
    border-left: 3px solid rgba(56, 189, 248, .75);
    background: linear-gradient(90deg, rgba(56, 189, 248, .08), transparent);
}

.dgx-conversation-stream .dgx-system-message strong {
    color: #7dd3fc;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dgx-conversation-stream .dgx-user-message::before {
    content: "You";
    display: block;
    color: rgba(191, 219, 254, .8);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 5px;
}


/* v23 — direct canvas conversation, no heavy chat cards */
.dgx-conversation-stream .dgx-user-message,
.dgx-conversation-stream .dgx-system-message {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-width: 620px;
}

.dgx-conversation-stream .dgx-user-message {
    color: #f8fafc;
    text-align: right;
    padding: 10px 14px;
    border-right: 3px solid rgba(124, 58, 237, .85);
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, .10));
}

.dgx-conversation-stream .dgx-system-message {
    color: #e5e7eb;
    padding: 10px 14px;
    border-left: 3px solid rgba(56, 189, 248, .75);
    background: linear-gradient(90deg, rgba(56, 189, 248, .08), transparent);
}

.dgx-conversation-stream .dgx-system-message strong {
    color: #7dd3fc;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dgx-conversation-stream .dgx-user-message::before {
    content: "You";
    display: block;
    color: rgba(191, 219, 254, .8);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 5px;
}


/* v24 — Suggested Next Action card */
.dgx-next-action-card {
    align-self: flex-start;
    max-width: 720px;
    margin: 2px 0 8px 18px;
    padding: 14px 16px;
    border-left: 3px solid rgba(34, 197, 94, .82);
    background: linear-gradient(90deg, rgba(34,197,94,.10), transparent);
    color: #e5e7eb;
    animation: dgxMessageIn .22s ease-out both;
}

.dgx-next-action-card span {
    display: block;
    margin-bottom: 7px;
    color: #86efac;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.dgx-next-action-card p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.45;
}


/* ===== DGxOne Expandable Procedure ===== */

.dgx-next-title{
font-size:11px;
font-weight:800;
letter-spacing:.12em;
text-transform:uppercase;
color:#86efac;
margin-bottom:8px;
}

.dgx-next-action-card h4{
margin:4px 0 8px;
font-size:17px;
color:#fff;
}

.dgx-toggle-procedure{
margin-top:12px;
background:none;
border:none;
padding:0;
cursor:pointer;
color:#38bdf8;
font-weight:700;
}

.dgx-procedure{
display:none;
margin-top:16px;
padding-top:14px;
border-top:1px solid rgba(255,255,255,.08);
white-space:pre-wrap;
line-height:1.6;
}

.dgx-procedure.open{
display:block;
}


/* v25 — expandable suggested next action */
.dgx-next-title {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #86efac;
    margin-bottom: 8px;
}

.dgx-next-action-card h4 {
    margin: 4px 0 8px;
    font-size: 17px;
    color: #fff;
}

.dgx-toggle-procedure {
    margin-top: 12px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #38bdf8;
    font-weight: 800;
}

.dgx-procedure {
    display: none;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
    white-space: pre-wrap;
    line-height: 1.6;
}

.dgx-procedure.open {
    display: block;
}

/* v26 — Adaptive Mission Panel */
.dgx-mission-map-panel {
    margin-top: 18px;
}

.dgx-mission-collapsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 68px;
    padding: 14px 18px;
    border: 1px solid rgba(125, 211, 252, .12);
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, .72), rgba(15, 23, 42, .42)),
        radial-gradient(circle at right, rgba(124, 58, 237, .14), transparent 36%);
}

.dgx-mission-collapsed strong {
    display: block;
    color: #f8fafc;
    font-size: 15px;
    margin-bottom: 4px;
}

.dgx-mission-collapsed p {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
}

.dgx-mission-collapsed span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(16, 185, 129, .12);
    border: 1px solid rgba(16, 185, 129, .18);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.dgx-mission-map-panel .dgx-mission-map-shell {
    display: none;
}

.dgx-brain-clean[data-mission-active="true"] .dgx-mission-collapsed {
    display: none;
}

.dgx-brain-clean[data-mission-active="true"] .dgx-mission-map-shell {
    display: block;
    animation: dgxPanelReveal .28s ease-out both;
}

.dgx-brain-clean[data-mission-active="true"] .dgx-os-pipeline {
    display: grid;
}

.dgx-brain-clean:not([data-mission-active="true"]) .dgx-os-pipeline {
    display: none;
}

@keyframes dgxPanelReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* v31 — temporary icon-only thinking row */
.dgx-thinking-row {
    align-self: flex-start;
    display: flex;
    gap: 12px;
    margin: 8px 0 8px 8px;
    padding: 10px 14px;
    border-left: 3px solid rgba(56, 189, 248, .72);
    background: linear-gradient(90deg, rgba(56,189,248,.08), transparent);
    animation: dgxMessageIn .18s ease-out both;
}

.dgx-thinking-row span {
    font-size: 18px;
    opacity: .3;
    animation: dgxThinkingIcon 1.1s infinite ease-in-out;
}

.dgx-thinking-row span:nth-child(2) { animation-delay: .14s; }
.dgx-thinking-row span:nth-child(3) { animation-delay: .28s; }
.dgx-thinking-row span:nth-child(4) { animation-delay: .42s; }

@keyframes dgxThinkingIcon {
    0%, 80%, 100% {
        opacity: .25;
        transform: translateY(0) scale(.88);
    }
    40% {
        opacity: 1;
        transform: translateY(-4px) scale(1.08);
    }
}

/* v30 — runtime-aware thinking strip */
.dgx-thinking-row[data-stage="complete"] {
    opacity: .75;
}

.dgx-thinking-row[data-stage*="Memory"] span[title="Memory"],
.dgx-thinking-row[data-stage*="Knowledge"] span[title="Knowledge"],
.dgx-thinking-row[data-stage*="Engineering"] span[title="Engineering"],
.dgx-thinking-row[data-stage*="Report"] span[title="Report"],
.dgx-thinking-row[data-stage="runtime"] span[title="Intent"] {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(56,189,248,.65));
}

/* v32 — first-screen mission-console density */
.dgx-conversation {
    height: 330px;
}

.dgx-brain-clean[data-mission-active="true"] .dgx-conversation {
    height: 470px;
}

.dgx-conversation-header {
    flex-basis: 68px;
    padding: 12px 20px;
}

.dgx-conversation-header h2 {
    margin: 2px 0;
    font-size: 20px;
}

.dgx-conversation-header p {
    font-size: 13px;
}

.dgx-conversation-stream {
    padding: 14px 24px;
    gap: 10px;
}

.dgx-command-composer {
    flex-basis: 58px;
    margin: 0 20px 14px;
    padding: 8px;
    gap: 10px;
}

.dgx-command-composer::before {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 12px;
    font-size: 21px;
}

.dgx-command-composer #observations {
    height: 38px;
    min-height: 38px;
    padding: 8px 5px;
}

#brainSend {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
}

.dgx-mission-map-panel {
    margin-top: 12px;
}

.dgx-mission-collapsed {
    min-height: 54px;
    padding: 9px 16px;
    border-radius: 14px;
}

/* v31 — Full immersive Command Center chat */
.dgx-brain-clean {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 96px);
}

.dgx-brain-clean .dgx-mission-status {
    flex: 0 0 auto;
}

.dgx-brain-clean .dgx-conversation {
    flex: 1 1 auto;
    min-height: calc(100vh - 230px);
    height: calc(100vh - 230px);
}

.dgx-conversation-stream {
    flex: 1;
    min-height: 0;
}

/* Hide lower panels from main chat-first workspace */
.dgx-brain-clean .dgx-mission-map-panel,
.dgx-brain-clean .dgx-os-pipeline,
.dgx-brain-clean .dgx-os-history {
    display: none !important;
}

/* Keep quick actions compact under chat */
.dgx-brain-clean .dgx-os-command-row {
    margin-top: 14px;
    flex: 0 0 auto;
}

/* Make composer feel pinned inside the full chat canvas */
.dgx-command-composer {
    margin-bottom: 18px;
}

/* v32 — Cognitive Runtime Experience */
.dgx-cognitive-runtime {
    align-self: flex-start;
    width: min(760px, 92%);
    margin: 12px 0 14px 8px;
    padding: 18px;
    border-left: 3px solid rgba(56,189,248,.82);
    background:
        linear-gradient(90deg, rgba(56,189,248,.10), transparent),
        rgba(8, 13, 26, .72);
    animation: dgxMessageIn .2s ease-out both;
}

.dgx-runtime-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.dgx-runtime-head strong {
    color: #e0f2fe;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 11px;
}

.dgx-runtime-head span {
    color: #94a3b8;
    font-size: 12px;
}

.dgx-runtime-stage {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    opacity: .48;
}

.dgx-runtime-stage b {
    font-size: 22px;
    filter: grayscale(.4);
}

.dgx-runtime-stage strong {
    display: block;
    color: #f8fafc;
    font-size: 14px;
    margin-bottom: 3px;
}

.dgx-runtime-stage span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 8px;
}

.dgx-runtime-stage i {
    display: block;
    height: 4px;
    width: 100%;
    border-radius: 999px;
    background: rgba(148,163,184,.16);
    overflow: hidden;
}

.dgx-runtime-stage i::after {
    content: "";
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #7c3aed);
    transition: width .35s ease;
}

.dgx-runtime-stage.active {
    opacity: 1;
}

.dgx-runtime-stage.active b {
    filter: drop-shadow(0 0 14px rgba(56,189,248,.8));
    animation: dgxThinkingIcon 1.1s infinite ease-in-out;
}

.dgx-runtime-stage.active i::after {
    width: 68%;
    animation: dgxRuntimePulse 1.1s infinite ease-in-out;
}

.dgx-runtime-stage.complete {
    opacity: 1;
}

.dgx-runtime-stage.complete span {
    color: #86efac;
}

.dgx-runtime-stage.complete i::after {
    width: 100%;
    background: linear-gradient(90deg, #22c55e, #86efac);
}

@keyframes dgxRuntimePulse {
    0%, 100% { opacity: .55; }
    50% { opacity: 1; }
}

/* v35 — Force horizontal cognitive pipeline */
.dgx-cognitive-pipeline {
    display: block !important;
    width: min(820px, 92%) !important;
    margin: 14px 0 18px 24px !important;
    padding: 14px 18px !important;
    border-left: 3px solid rgba(56,189,248,.9) !important;
    background: linear-gradient(90deg, rgba(56,189,248,.12), rgba(124,58,237,.06), transparent) !important;
}

.dgx-pipeline-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px !important;
}

.dgx-pipeline-track {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100% !important;
}

.dgx-pipeline-stage {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 1 0 !important;
    opacity: .45;
    position: relative !important;
}

.dgx-pipeline-stage::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 38px !important;
    right: 8px !important;
    top: 15px !important;
    height: 3px !important;
    border-radius: 999px !important;
    background: rgba(148,163,184,.20) !important;
}

.dgx-pipeline-stage:last-child::after {
    display: none !important;
}

.dgx-pipeline-stage span {
    width: 30px !important;
    height: 30px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 12px !important;
    background: rgba(15,23,42,.92) !important;
    border: 1px solid rgba(148,163,184,.22) !important;
    z-index: 2 !important;
}

.dgx-pipeline-stage small {
    display: block !important;
    color: #cbd5e1 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    z-index: 2 !important;
}

.dgx-pipeline-stage.active {
    opacity: 1 !important;
}

.dgx-pipeline-stage.active span {
    border-color: rgba(56,189,248,.8) !important;
    box-shadow: 0 0 18px rgba(56,189,248,.45) !important;
}

.dgx-pipeline-stage.active::after {
    background: linear-gradient(90deg, #38bdf8, #7c3aed) !important;
    box-shadow: 0 0 12px rgba(56,189,248,.55) !important;
}

.dgx-pipeline-stage.complete {
    opacity: 1 !important;
}

.dgx-pipeline-stage.complete span {
    border-color: rgba(34,197,94,.75) !important;
    box-shadow: 0 0 16px rgba(34,197,94,.35) !important;
}

.dgx-pipeline-stage.complete::after {
    background: linear-gradient(90deg, #22c55e, #38bdf8) !important;
}


/* v35 — Force horizontal cognitive pipeline */
.dgx-cognitive-pipeline {
    display: block !important;
    width: min(820px, 92%) !important;
    margin: 14px 0 18px 24px !important;
    padding: 14px 18px !important;
    border-left: 3px solid rgba(56,189,248,.9) !important;
    background: linear-gradient(90deg, rgba(56,189,248,.12), rgba(124,58,237,.06), transparent) !important;
}

.dgx-pipeline-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px !important;
}

.dgx-pipeline-track {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100% !important;
}

.dgx-pipeline-stage {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 1 0 !important;
    opacity: .45;
    position: relative !important;
}

.dgx-pipeline-stage::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 38px !important;
    right: 8px !important;
    top: 15px !important;
    height: 3px !important;
    border-radius: 999px !important;
    background: rgba(148,163,184,.20) !important;
}

.dgx-pipeline-stage:last-child::after {
    display: none !important;
}

.dgx-pipeline-stage span {
    width: 30px !important;
    height: 30px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 12px !important;
    background: rgba(15,23,42,.92) !important;
    border: 1px solid rgba(148,163,184,.22) !important;
    z-index: 2 !important;
}

.dgx-pipeline-stage small {
    display: block !important;
    color: #cbd5e1 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    z-index: 2 !important;
}

.dgx-pipeline-stage.active {
    opacity: 1 !important;
}

.dgx-pipeline-stage.active span {
    border-color: rgba(56,189,248,.8) !important;
    box-shadow: 0 0 18px rgba(56,189,248,.45) !important;
}

.dgx-pipeline-stage.active::after {
    background: linear-gradient(90deg, #38bdf8, #7c3aed) !important;
    box-shadow: 0 0 12px rgba(56,189,248,.55) !important;
}

.dgx-pipeline-stage.complete {
    opacity: 1 !important;
}

.dgx-pipeline-stage.complete span {
    border-color: rgba(34,197,94,.75) !important;
    box-shadow: 0 0 16px rgba(34,197,94,.35) !important;
}

.dgx-pipeline-stage.complete::after {
    background: linear-gradient(90deg, #22c55e, #38bdf8) !important;
}


/* v36 — animated pipeline wiring */
.dgx-pipeline-stage.active::after {
    background-size: 220% 100% !important;
    animation: dgxPipelineEnergy 1.05s linear infinite !important;
}

.dgx-pipeline-stage.complete::after {
    background: linear-gradient(90deg, #22c55e, #38bdf8) !important;
}

.dgx-pipeline-stage.complete small {
    color: #86efac !important;
}

.dgx-pipeline-stage.complete span {
    transform: scale(1.02);
}

@keyframes dgxPipelineEnergy {
    from { background-position: 0% 50%; }
    to { background-position: 220% 50%; }
}

/* v37 — Living Mission Control agent states */
.dgx-agent-meter.running {
    border-color: rgba(56,189,248,.28);
    box-shadow: inset 0 0 24px rgba(56,189,248,.08);
}

.dgx-agent-meter.running .dgx-agent-icon {
    animation: dgxThinkingIcon 1.1s infinite ease-in-out;
    filter: drop-shadow(0 0 12px rgba(56,189,248,.65));
}

.dgx-agent-meter.complete {
    border-color: rgba(34,197,94,.28);
    box-shadow: inset 0 0 24px rgba(34,197,94,.08);
}

.dgx-agent-meter.complete .dgx-agent-icon {
    filter: drop-shadow(0 0 12px rgba(34,197,94,.55));
}

.dgx-agent-meter.complete strong::after {
    content: " ✓";
    color: #86efac;
}

.dgx-ops-events span {
    animation: dgxOpsEventIn .22s ease-out both;
}

@keyframes dgxOpsEventIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* v38 — Living Cognitive Graph */
.dgx-cognitive-graph-panel {
    display: none;
    margin: 18px 24px 10px;
    padding: 16px 18px;
    border: 1px solid rgba(125,211,252,.14);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 0%, rgba(56,189,248,.15), transparent 38%),
        rgba(8,13,26,.56);
}

.dgx-brain-clean[data-mission-active="true"] .dgx-cognitive-graph-panel {
    display: block;
    animation: dgxPanelReveal .25s ease-out both;
}

.dgx-graph-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dgx-graph-head strong {
    color: #e0f2fe;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.dgx-graph-head span {
    color: #94a3b8;
    font-size: 12px;
}

.dgx-cognitive-graph {
    position: relative;
    min-height: 300px;
}

.dgx-graph-row.center {
    display: flex;
    justify-content: center;
    margin: 14px 0;
}

.dgx-graph-split {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 18px 0;
}

.dgx-graph-node {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 64px;
    padding: 10px;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: 16px;
    background: rgba(15,23,42,.82);
    color: #cbd5e1;
    opacity: .46;
    transition: .25s ease;
}

.dgx-graph-node b {
    font-size: 22px;
}

.dgx-graph-node span {
    font-size: 12px;
    font-weight: 900;
}

.dgx-graph-node.running,
.dgx-graph-node.active {
    opacity: 1;
    border-color: rgba(56,189,248,.72);
    box-shadow: 0 0 22px rgba(56,189,248,.28);
    animation: dgxThinkingIcon 1.1s infinite ease-in-out;
}

.dgx-graph-node.completed,
.dgx-graph-node.complete {
    opacity: 1;
    border-color: rgba(34,197,94,.65);
    box-shadow: 0 0 18px rgba(34,197,94,.22);
}

.dgx-graph-node.completed span::after,
.dgx-graph-node.complete span::after {
    content: " ✓";
    color: #86efac;
}

.dgx-graph-wire {
    position: absolute;
    z-index: 1;
    height: 2px;
    background: rgba(148,163,184,.16);
    transform-origin: left center;
    overflow: hidden;
}

.dgx-graph-wire i {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #7c3aed, #22c55e);
    background-size: 220% 100%;
}

.dgx-graph-wire.running i {
    width: 100%;
    animation: dgxPipelineEnergy 1.05s linear infinite;
}

.dgx-graph-wire.completed i {
    width: 100%;
    background: linear-gradient(90deg, #22c55e, #38bdf8);
}

.wire-intent-engineering { left: 35%; top: 82px; width: 18%; transform: rotate(155deg); }
.wire-intent-memory { left: 47%; top: 88px; width: 15%; transform: rotate(90deg); }
.wire-intent-knowledge { left: 50%; top: 82px; width: 18%; transform: rotate(25deg); }
.wire-engineering-evidence { left: 28%; top: 176px; width: 24%; transform: rotate(18deg); }
.wire-memory-evidence { left: 50%; top: 178px; width: 12%; transform: rotate(90deg); }
.wire-knowledge-evidence { left: 50%; top: 176px; width: 24%; transform: rotate(162deg); }
.wire-evidence-decision { left: 50%; top: 220px; width: 58px; transform: rotate(90deg); }
.wire-decision-report { left: 50%; top: 274px; width: 58px; transform: rotate(90deg); }




/* v39 — Live Evidence Board */
.dgx-evidence-board {
    margin: 16px 24px 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(9,15,30,.58);
    border: 1px solid rgba(56,189,248,.14);
    backdrop-filter: blur(20px);
}

.dgx-evidence-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.dgx-evidence-head strong {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #dbeafe;
}

.dgx-evidence-head span {
    font-size: 12px;
    color: #94a3b8;
}

.dgx-evidence-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.dgx-evidence-card {
    padding: 14px;
    border-radius: 14px;
    background: rgba(17,24,39,.86);
    border: 1px solid rgba(148,163,184,.13);
    animation: dgxEvidenceAppear .28s ease-out both;
}

.dgx-evidence-card h4 {
    margin: 0 0 7px;
    color: #f8fafc;
    font-size: 14px;
}

.dgx-evidence-card div {
    color: #cbd5e1;
    line-height: 1.35;
    font-size: 13px;
}

.dgx-evidence-card small {
    display: block;
    margin-top: 9px;
    color: #86efac;
    font-size: 11px;
    font-weight: 800;
}

.dgx-evidence-empty {
    color: #64748b;
    padding: 16px;
    text-align: center;
    grid-column: 1 / -1;
}

@keyframes dgxEvidenceAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}


/* v39.3 — Root Cause Ranking */
.dgx-rootcause-board {
    margin: 10px 24px 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(9,15,30,.54);
    border: 1px solid rgba(168,85,247,.14);
}

.dgx-rootcause-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dgx-rootcause-head strong {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #ede9fe;
}

.dgx-rootcause-head span {
    font-size: 12px;
    color: #94a3b8;
}

.dgx-rootcause-list {
    display: grid;
    gap: 10px;
}

.dgx-rootcause-item {
    display: grid;
    grid-template-columns: 1fr 48px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(17,24,39,.82);
    border: 1px solid rgba(148,163,184,.12);
    animation: dgxEvidenceAppear .25s ease-out both;
}

.dgx-rootcause-item strong {
    display: block;
    color: #f8fafc;
    font-size: 13px;
}

.dgx-rootcause-item span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 3px;
}

.dgx-rootcause-item b {
    color: #c084fc;
    font-size: 15px;
    text-align: right;
}

.dgx-rootcause-item i {
    grid-column: 1 / -1;
    display: block;
    height: 4px;
    border-radius: 999px;
    background: rgba(148,163,184,.14);
    overflow: hidden;
}

.dgx-rootcause-item em {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #a855f7);
    animation: dgxRootCauseFill .45s ease-out both;
}

.dgx-rootcause-empty {
    color: #64748b;
    text-align: center;
    padding: 12px;
}

@keyframes dgxRootCauseFill {
    from { width: 0; }
}


/* Mission Timeline */

.dgx-event{
display:flex;
gap:10px;
padding:8px 0;
border-bottom:1px solid rgba(255,255,255,.05);
animation:dgxEvidenceAppear .25s ease;
}

.dgx-event small{
width:72px;
color:#64748b;
font-size:11px;
}

.dgx-event span{
color:#dbeafe;
font-size:13px;
}


/* Mission Workspace */

.dgx-mission-workspace{

display:grid;

grid-template-columns:
1fr
1fr
1.35fr;

gap:18px;

margin:24px;

}

.dgx-work{

background:rgba(8,16,30,.55);

border:1px solid rgba(120,160,255,.12);

border-radius:18px;

padding:18px;

min-height:180px;

backdrop-filter:blur(24px);

transition:.25s;

}

.dgx-work:hover{

border-color:#3b82f6;

transform:translateY(-2px);

box-shadow:0 0 35px rgba(59,130,246,.22);

}

.dgx-work h4{

margin-bottom:14px;

font-size:12px;

letter-spacing:.18em;

text-transform:uppercase;

color:#8dd9ff;

}

.procedure{

grid-row:span 2;

}

.report{

grid-column:span 2;

}

.timeline{

min-height:240px;

}


/* v43 Mission Workspace */

.dgx-work-item{
    margin-bottom:10px;
    padding:10px;
    border-radius:10px;
    background:rgba(255,255,255,.04);
    border-left:3px solid #38bdf8;
    animation:dgxEvidenceAppear .25s ease-out;
}

.dgx-placeholder{
    color:#64748b;
    font-style:italic;
}


/* v44 — Live Multi-Agent Orchestration */
.dgx-agent-orchestration {
    display: grid;
    gap: 10px;
}

.dgx-agent-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, .72);
    border: 1px solid rgba(148, 163, 184, .12);
    opacity: .48;
    transition: .25s ease;
}

.dgx-agent-step b {
    font-size: 20px;
}

.dgx-agent-step strong {
    display: block;
    color: #f8fafc;
    font-size: 13px;
}

.dgx-agent-step span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 2px;
}

.dgx-agent-step.running {
    opacity: 1;
    border-color: rgba(56, 189, 248, .46);
    box-shadow: inset 0 0 22px rgba(56, 189, 248, .08);
}

.dgx-agent-step.running b {
    animation: dgxThinkingIcon 1.1s infinite ease-in-out;
    filter: drop-shadow(0 0 12px rgba(56,189,248,.65));
}

.dgx-agent-step.complete {
    opacity: 1;
    border-color: rgba(34, 197, 94, .34);
}

.dgx-agent-step.complete strong::after {
    content: " ✓";
    color: #86efac;
}

.dgx-agent-step.complete span {
    color: #86efac;
}


/* v44 — Live Multi-Agent Orchestration */
.dgx-agent-orchestration {
    display: grid;
    gap: 10px;
}

.dgx-agent-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, .72);
    border: 1px solid rgba(148, 163, 184, .12);
    opacity: .48;
    transition: .25s ease;
}

.dgx-agent-step b {
    font-size: 20px;
}

.dgx-agent-step strong {
    display: block;
    color: #f8fafc;
    font-size: 13px;
}

.dgx-agent-step span {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 2px;
}

.dgx-agent-step.running {
    opacity: 1;
    border-color: rgba(56, 189, 248, .46);
    box-shadow: inset 0 0 22px rgba(56, 189, 248, .08);
}

.dgx-agent-step.running b {
    animation: dgxThinkingIcon 1.1s infinite ease-in-out;
    filter: drop-shadow(0 0 12px rgba(56,189,248,.65));
}

.dgx-agent-step.complete {
    opacity: 1;
    border-color: rgba(34, 197, 94, .34);
}

.dgx-agent-step.complete strong::after {
    content: " ✓";
    color: #86efac;
}

.dgx-agent-step.complete span {
    color: #86efac;
}


/* v45 — Live Report Preview */
.dgx-report-fragment {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(15,23,42,.72);
    border-left: 3px solid rgba(56,189,248,.75);
    animation: dgxEvidenceAppear .25s ease-out both;
}

.dgx-report-fragment strong {
    display: block;
    color: #e0f2fe;
    font-size: 13px;
    margin-bottom: 5px;
}

.dgx-report-fragment p {
    margin: 0;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.45;
}

/* v46 Technical References */

.dgx-reference-card{

padding:12px;

margin-bottom:10px;

border-radius:12px;

background:rgba(255,255,255,.04);

border-left:3px solid #7c3aed;

animation:dgxEvidenceAppear .25s ease-out;

}

.dgx-reference-title{

font-weight:700;

color:#f8fafc;

}

.dgx-reference-subtitle{

margin-top:3px;

font-size:12px;

color:#94a3b8;

}

.dgx-reference-badge{

display:inline-block;

margin-top:8px;

padding:2px 8px;

border-radius:999px;

font-size:11px;

background:#312e81;

color:#c4b5fd;

}

/* v47 — DGxOne Command Deck Revamp */
.dgx-command-deck {
    gap: 16px;
    padding: 2px;
    min-height: calc(100vh - 96px);
}

.dgx-command-deck .dgx-deck-hero {
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(8, 13, 26, .94), rgba(15, 23, 42, .78)),
        radial-gradient(circle at 18% 0%, rgba(56, 189, 248, .18), transparent 34%),
        radial-gradient(circle at 86% 10%, rgba(34, 197, 94, .12), transparent 30%);
    border: 1px solid rgba(125, 211, 252, .16);
    box-shadow: 0 20px 70px rgba(0, 0, 0, .28);
}

.dgx-deck-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
}

.dgx-deck-card {
    border: 1px solid rgba(125, 211, 252, .14);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, .9), rgba(8, 13, 26, .84)),
        radial-gradient(circle at 80% 0%, rgba(56, 189, 248, .08), transparent 35%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    overflow: hidden;
}

.dgx-command-deck .dgx-conversation {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    display: flex;
}

.dgx-command-deck[data-mission-active="true"] .dgx-conversation,
.dgx-command-deck .dgx-brain-clean[data-mission-active="true"] .dgx-conversation {
    height: auto;
}

.dgx-intake-card {
    min-height: 390px;
}

.dgx-command-deck .dgx-conversation-header {
    flex: 0 0 auto;
    min-height: 72px;
    padding: 12px 16px 10px;
}

.dgx-command-deck .dgx-conversation-header h2 {
    font-size: 19px;
}

.dgx-command-deck .dgx-conversation-header p {
    max-width: 310px;
    font-size: 12px;
}

.dgx-command-deck .dgx-conversation-stream {
    flex: 0 0 148px;
    min-height: 148px;
    padding: 12px 16px;
}

.dgx-command-deck .dgx-command-composer {
    flex-basis: 52px;
    margin: 0 16px 10px;
    border-radius: 16px;
}

.dgx-deck-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 16px 14px;
}

.dgx-deck-actions button {
    width: 100%;
    min-height: 36px;
    margin: 0;
    padding: 8px 9px;
    border: 1px solid rgba(125, 211, 252, .16);
    border-radius: 12px;
    background: rgba(15, 23, 42, .72);
    color: #dbeafe;
    font-size: 11px;
    font-weight: 900;
    box-shadow: none;
}

.dgx-deck-actions button:hover {
    border-color: rgba(56, 189, 248, .42);
    background: rgba(14, 116, 144, .20);
}

.dgx-command-deck .dgx-mission-workspace {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 14px;
    margin: 0;
    padding: 16px;
    min-height: 560px;
}

.dgx-workspace-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.dgx-workspace-head h3 {
    margin: 4px 0 0;
    font-size: 22px;
    letter-spacing: 0;
}

.dgx-workspace-head strong {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .18);
    color: #86efac;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dgx-workspace-primary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.dgx-workspace-secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
}

.dgx-command-deck .dgx-evidence-board,
.dgx-command-deck .dgx-rootcause-board,
.dgx-command-deck .dgx-work {
    margin: 0;
    min-height: 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(5, 10, 24, .58);
    border: 1px solid rgba(148, 163, 184, .13);
    backdrop-filter: none;
    transform: none;
    box-shadow: none;
}

.dgx-command-deck .dgx-work:hover {
    transform: none;
    border-color: rgba(56, 189, 248, .32);
    box-shadow: inset 0 0 28px rgba(56, 189, 248, .05);
}

.dgx-command-deck .dgx-evidence-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dgx-command-deck .dgx-evidence-card,
.dgx-command-deck .dgx-rootcause-item,
.dgx-command-deck .dgx-work-item,
.dgx-command-deck .dgx-report-fragment,
.dgx-command-deck .dgx-reference-card {
    border-radius: 12px;
    background: rgba(15, 23, 42, .76);
}

.dgx-command-deck .procedure,
.dgx-command-deck .report {
    grid-row: auto;
    grid-column: auto;
}

.dgx-command-deck .timeline {
    min-height: 0;
}

.dgx-deck-side {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .38fr);
    gap: 16px;
    min-height: 0;
}

.dgx-command-deck .dgx-mission-map-panel {
    display: block !important;
    margin: 0;
    padding: 16px;
}

.dgx-command-deck .dgx-mission-map-shell {
    display: none;
}

.dgx-command-deck[data-mission-active="true"] .dgx-mission-map-shell {
    display: block;
}

.dgx-command-deck[data-mission-active="true"] .dgx-mission-collapsed {
    display: none;
}

.dgx-command-deck .dgx-mission-collapsed {
    min-height: 98px;
    margin-top: 14px;
}

.dgx-command-deck .dgx-mission-graph-v2 {
    min-height: 330px;
}

.dgx-command-deck .dgx-os-history {
    display: block !important;
    padding: 14px;
    max-height: 260px;
}

.dgx-command-deck .history-search {
    width: 100%;
}

.dgx-command-deck > .dgx-os-pipeline {
    display: none !important;
}

.dgx-cognitive-pipeline {
    width: calc(100% - 8px) !important;
    margin: 8px 0 12px 4px !important;
}

.dgx-command-deck .dgx-pipeline-track {
    overflow-x: auto !important;
    padding-bottom: 2px;
}

@media (min-width: 1500px) {
    .dgx-deck-grid {
        grid-template-columns: minmax(320px, .82fr) minmax(560px, 1.34fr);
    }

    .dgx-workspace-secondary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1900px) {
    .dgx-deck-grid {
        grid-template-columns: minmax(320px, 0.82fr) minmax(560px, 1.34fr) minmax(300px, 0.8fr);
    }

    .dgx-deck-side {
        grid-column: auto;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        min-height: calc(100vh - 190px);
    }
}

@media (max-width: 1120px) {
    .dgx-deck-grid,
    .dgx-workspace-primary,
    .dgx-workspace-secondary,
    .dgx-deck-side {
        grid-template-columns: 1fr;
    }

    .dgx-intake-card,
    .dgx-command-deck .dgx-mission-workspace,
    .dgx-deck-side {
        min-height: 0;
    }

    .dgx-command-deck .dgx-conversation-stream {
        min-height: 240px;
    }
}

@media (max-width: 720px) {
    .dgx-command-deck .dgx-deck-hero,
    .dgx-deck-card {
        border-radius: 14px;
    }

    .dgx-deck-actions,
    .dgx-command-deck .dgx-evidence-cards {
        grid-template-columns: 1fr;
    }

    .dgx-command-deck .dgx-conversation-header,
    .dgx-workspace-head {
        display: grid;
    }
}


/* v46 Technical References */

.dgx-reference-card{

padding:12px;

margin-bottom:10px;

border-radius:12px;

background:rgba(255,255,255,.04);

border-left:3px solid #7c3aed;

animation:dgxEvidenceAppear .25s ease-out;

}

.dgx-reference-title{

font-weight:700;

color:#f8fafc;

}

.dgx-reference-subtitle{

margin-top:3px;

font-size:12px;

color:#94a3b8;

}

.dgx-reference-badge{

display:inline-block;

margin-top:8px;

padding:2px 8px;

border-radius:999px;

font-size:11px;

background:#312e81;

color:#c4b5fd;

}


/* v64.3 */

.dgx-next-action-card{

gap:10px;

}

.dgx-next-action-card .dgx-action-button{

margin-top:2px;

}


/* DGxOne — Complete Procedure action */

.dgx-open-complete-procedure {
    width: fit-content !important;
    min-height: 38px !important;
    margin-top: 10px !important;
    padding: 0 16px !important;
    border: 1px solid rgba(88, 210, 255, 0.28) !important;
    border-radius: 11px !important;
    color: #f8fbff !important;
    background:
        linear-gradient(
            135deg,
            rgba(43, 140, 255, 0.92),
            rgba(105, 93, 255, 0.92)
        ) !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease !important;
}

.dgx-open-complete-procedure:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(120, 228, 255, 0.65) !important;
    box-shadow:
        0 0 20px rgba(75, 180, 255, 0.28) !important;
}

.dgx-open-complete-procedure:active {
    transform: scale(0.98) !important;
}


/* DGxOne Beta — adaptive cognitive thinking panel */

.dgx-thinking-panel {
    width: min(520px, calc(100% - 12px));
    margin: 8px 0 12px 4px;
    padding: 15px 17px 14px;
    border: 1px solid rgba(125, 211, 252, .18);
    border-radius: 16px;
    background:
        radial-gradient(
            circle at 8% 0%,
            rgba(56, 189, 248, .12),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            rgba(13, 24, 43, .92),
            rgba(10, 17, 31, .88)
        );
    box-shadow:
        0 18px 40px rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .035);
    animation: dgxThinkingEnter .24s ease-out both;
    overflow: hidden;
}

.dgx-thinking-panel.is-leaving {
    animation: dgxThinkingLeave .18s ease-in both;
}

.dgx-thinking-panel.is-complete {
    border-color: rgba(74, 222, 128, .24);
}

.dgx-thinking-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 12px;
}

.dgx-thinking-head > div {
    min-width: 0;
}

.dgx-thinking-head strong {
    display: block;
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: .01em;
    color: rgba(241, 245, 249, .96);
}

.dgx-thinking-head small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, .72);
}

.dgx-thinking-orb {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(224, 242, 254, .96),
            rgba(56, 189, 248, .7) 24%,
            rgba(99, 102, 241, .44) 58%,
            rgba(15, 23, 42, .2) 76%
        );
    box-shadow:
        0 0 0 5px rgba(56, 189, 248, .05),
        0 0 22px rgba(56, 189, 248, .35);
    animation: dgxThinkingOrb 1.65s ease-in-out infinite;
}

.dgx-thinking-orb::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(125, 211, 252, .24);
    border-radius: inherit;
    animation: dgxThinkingRing 1.65s ease-out infinite;
}

.dgx-thinking-stages {
    display: grid;
    gap: 6px;
    padding-left: 3px;
}

.dgx-thinking-stage {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    min-height: 23px;
    opacity: .38;
    transform: translateX(0);
    transition:
        opacity .22s ease,
        transform .22s ease,
        color .22s ease;
}

.dgx-thinking-stage.active {
    opacity: 1;
    transform: translateX(3px);
}

.dgx-thinking-stage.complete {
    opacity: .7;
}

.dgx-thinking-status {
    position: relative;
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(100, 116, 139, .58);
    transition:
        background .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.dgx-thinking-stage.active .dgx-thinking-status {
    background: #38bdf8;
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, .08),
        0 0 12px rgba(56, 189, 248, .7);
    animation: dgxThinkingStagePulse 1.05s ease-in-out infinite;
}

.dgx-thinking-stage.complete .dgx-thinking-status {
    width: 12px;
    height: 12px;
    margin-left: -2px;
    background: rgba(74, 222, 128, .14);
    border: 1px solid rgba(74, 222, 128, .5);
}

.dgx-thinking-stage.complete .dgx-thinking-status::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 1px;
    width: 3px;
    height: 6px;
    border-right: 1.5px solid #86efac;
    border-bottom: 1.5px solid #86efac;
    transform: rotate(42deg);
}

.dgx-thinking-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(148, 163, 184, .78);
}

.dgx-thinking-stage.active .dgx-thinking-label {
    color: rgba(224, 242, 254, .98);
}

.dgx-thinking-stage.complete .dgx-thinking-label {
    color: rgba(187, 247, 208, .76);
}

@keyframes dgxThinkingEnter {
    from {
        opacity: 0;
        transform: translateY(7px) scale(.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes dgxThinkingLeave {
    to {
        opacity: 0;
        transform: translateY(-4px) scale(.99);
    }
}

@keyframes dgxThinkingOrb {
    0%, 100% {
        transform: scale(.94);
        filter: brightness(.92);
    }
    50% {
        transform: scale(1.04);
        filter: brightness(1.16);
    }
}

@keyframes dgxThinkingRing {
    from {
        opacity: .75;
        transform: scale(.82);
    }
    to {
        opacity: 0;
        transform: scale(1.34);
    }
}

@keyframes dgxThinkingStagePulse {
    0%, 100% {
        transform: scale(.82);
        opacity: .68;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dgx-thinking-panel,
    .dgx-thinking-orb,
    .dgx-thinking-orb::after,
    .dgx-thinking-stage.active .dgx-thinking-status {
        animation: none !important;
    }
}
.dgx-global-command-palette {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    place-items: start center;
    padding: 12vh 18px 18px;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(18px);
}

.dgx-global-command-palette.is-open {
    display: grid;
}

.dgx-global-command-box {
    width: min(680px, 100%);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 8px;
    background: rgba(10, 13, 18, 0.96);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.dgx-global-command-box input {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.12);
    outline: 0;
    padding: 0 18px;
    color: #f8fafc;
    background: transparent;
}

.dgx-global-command-box input:focus {
    box-shadow: inset 0 0 0 2px rgba(110, 231, 249, 0.56);
}

.dgx-global-command-list {
    display: grid;
    gap: 4px;
    padding: 8px;
}

.dgx-global-command-list button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0 12px;
    color: rgba(226, 232, 240, 0.72);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.dgx-global-command-list button:hover,
.dgx-global-command-list button:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    outline: 0;
}

@media (max-width: 760px) {
    .dgx-brain-runtime-grid,
    .dgx-brain-runtime-timeline li {
        grid-template-columns: 1fr;
    }

    .dgx-brain-runtime-timeline {
        max-height: 180px;
    }
}
.dgx-provider-routing-label,
.dgx-knowledge-grounding-label,
.dgx-memory-used-label {
    display: block;
    margin-top: 0.45rem;
    color: var(--dgx-text-muted, #7f8b9d);
    font-size: 0.72rem;
    line-height: 1.3;
}

.dgx-knowledge-grounding-label,
.dgx-memory-used-label {
    margin-top: 0.2rem;
}

/* DGxOne message selection boundary */
.dgx-user-message > .dgx-user-identity-badge,
.dgx-user-message > .dgx-user-identity-badge *,
.dgx-system-message > .dgx-reply-avatar,
.dgx-system-message > .dgx-reply-avatar * {
    -webkit-user-select: none !important;
    user-select: none !important;
    pointer-events: none;
}

.dgx-user-message > .dgx-message-copy,
.dgx-user-message > .dgx-message-copy *,
.dgx-system-message > .dgx-message-copy,
.dgx-system-message > .dgx-message-copy * {
    -webkit-user-select: text;
    user-select: text;
}
