:root {
    --navy: #07111f;
    --navy-2: #0b1b30;
    --surface: #10263e;
    --surface-2: #153452;
    --line: rgba(175, 209, 235, .17);
    --line-strong: rgba(175, 209, 235, .32);
    --text: #eff7ff;
    --muted: #9eb3c7;
    --faint: #6c849b;
    --cyan: #42d6d2;
    --blue: #5ba7ff;
    --amber: #f7bd61;
    --violet: #b897ff;
    --rose: #ff8897;
    --green: #7adf9a;
    --shadow: 0 18px 45px rgba(0, 0, 0, .18);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 1040px;
    background: var(--navy);
    color: var(--text);
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-header {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 34px;
    padding: 0 26px;
    border-bottom: 1px solid var(--line);
    background: rgba(7,17,31,.92);
}

.brand {
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    letter-spacing: -.4px;
    white-space: nowrap;
}

    .brand b {
        color: var(--cyan);
        font-weight: 720;
    }

.brand-mark {
    display: grid;
    grid-template-columns: repeat(3, 7px);
    gap: 3px;
    align-items: end;
    height: 21px;
}

    .brand-mark i {
        width: 7px;
        background: var(--cyan);
        border-radius: 3px;
        transform: skewY(-25deg);
    }

        .brand-mark i:nth-child(1) {
            height: 11px;
        }

        .brand-mark i:nth-child(2) {
            height: 21px;
        }

        .brand-mark i:nth-child(3) {
            height: 15px;
        }

.model-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
    flex: 1;
}

    .model-title input {
        background: transparent;
        border: 0;
        color: var(--text);
        font-size: 16px;
        font-weight: 650;
        width: 150px;
        outline: none;
        padding: 5px 2px;
        border-bottom: 1px solid transparent;
    }

        .model-title input:focus {
            border-bottom-color: var(--cyan);
        }

.dirty-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: transparent;
}

    .dirty-dot.visible {
        background: var(--amber);
        box-shadow: 0 0 0 3px rgba(247,189,97,.12);
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.button {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 600;
    transition: .15s ease;
    white-space: nowrap;
}

    .button:hover {
        border-color: var(--cyan);
        transform: translateY(-1px);
    }

    .button.primary {
        background: var(--cyan);
        color: #06222d;
        border-color: var(--cyan);
    }

        .button.primary:hover {
            filter: brightness(1.08);
        }

    .button.secondary {
        background: transparent;
    }

    .button.compact {
        padding: 6px 10px;
        font-size: 12px;
    }

.upload-button input {
    display: none;
}

.workspace {
    display: grid;
    grid-template-columns: 254px minmax(520px,1fr) 315px;
    gap: 14px;
    padding: 14px;
    height: calc(100vh - 72px);
}

.panel {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(19,47,75,.88), rgba(10,29,49,.88));
    border-radius: 11px;
    box-shadow: var(--shadow);
}

.tree-panel, .right-rail {
    min-height: 0;
}

.tree-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.right-rail {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: auto;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 17px 13px;
    border-bottom: 1px solid var(--line);
}

    .panel-heading.small {
        padding: 15px 16px 11px;
    }

.eyebrow {
    color: var(--cyan);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin: 0 0 5px;
}

h1, h2 {
    font-size: 16px;
    margin: 0;
    letter-spacing: -.2px;
}

h2 {
    font-size: 15px;
}

.icon-button {
    width: 29px;
    height: 29px;
    border-radius: 7px;
    border: 1px solid var(--line-strong);
    background: rgba(255,255,255,.04);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    display: grid;
    place-items: center;
}

    .icon-button:hover {
        border-color: var(--cyan);
        color: var(--cyan);
    }

    .icon-button.danger:hover {
        color: var(--rose);
        border-color: var(--rose);
    }

.tree {
    overflow: auto;
    padding: 10px 7px 18px;
    flex: 1;
}

.tree-node {
    user-select: none;
}

.tree-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    color: var(--muted);
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
}

    .tree-row:hover {
        background: rgba(255,255,255,.055);
        color: var(--text);
    }

    .tree-row.active {
        background: rgba(66,214,210,.13);
        color: #e8ffff;
    }

.tree-indent {
    margin-left: 16px;
    border-left: 1px solid rgba(175,209,235,.12);
    padding-left: 5px;
}

.tree-caret {
    color: var(--faint);
    width: 10px;
    font-size: 11px;
}

.tree-icon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
}

.type-system {
    background: rgba(66,214,210,.18);
    color: var(--cyan);
}

.type-block {
    background: rgba(91,167,255,.16);
    color: var(--blue);
}

.type-process {
    background: rgba(184,151,255,.16);
    color: var(--violet);
}

.type-procedure {
    background: rgba(247,189,97,.16);
    color: var(--amber);
}

.type-state {
    background: rgba(122,223,154,.16);
    color: var(--green);
}

.tree-row small {
    margin-left: auto;
    color: var(--faint);
    font-size: 10px;
}

.tree-footer {
    padding: 11px 16px;
    border-top: 1px solid var(--line);
}

.text-button {
    color: var(--muted);
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 12px;
}

    .text-button:hover {
        color: var(--cyan);
    }

.main-panel {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0,1fr);
    gap: 14px;
}

.canvas-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px 9px 16px;
    min-height: 51px;
}

.breadcrumb {
    display: flex;
    gap: 7px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

    .breadcrumb strong {
        color: var(--text);
        font-weight: 650;
    }

    .breadcrumb .crumb-type {
        color: var(--cyan);
        background: rgba(66,214,210,.09);
        padding: 4px 7px;
        border-radius: 5px;
        font-size: 10px;
        text-transform: uppercase;
        font-weight: 750;
        letter-spacing: .06em;
    }

.view-options {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .view-options .icon-button {
        width: 29px;
        height: 29px;
        font-size: 18px;
    }

.diagram {
    min-height: 0;
    position: relative;
    overflow: auto;
    padding: 26px;
    background-image: radial-gradient(rgba(147,190,221,.18) 1px, transparent 1px);
    background-size: 22px 22px;
}

.diagram-empty {
    height: 100%;
    min-height: 330px;
    display: grid;
    place-content: center;
    text-align: center;
    color: var(--muted);
}

    .diagram-empty strong {
        color: var(--text);
        font-size: 17px;
        margin-bottom: 7px;
    }

.system-diagram {
    position: relative;
    min-width: 650px;
    min-height: 440px;
    height: 100%;
}

.diagram-label {
    position: absolute;
    top: 0;
    left: 0;
    color: var(--faint);
    font-size: 11px;
    letter-spacing: .09em;
    text-transform: uppercase;
    font-weight: 700;
}

.connection-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: visible;
    pointer-events: none;
}

.connection-line {
    stroke: rgba(66,214,210,.82);
    stroke-width: 2;
    fill: none;
}

    .connection-line.dual {
        stroke-dasharray: 5 4;
    }

.connection-label {
    fill: var(--cyan);
    font-size: 11px;
    font-weight: 650;
    paint-order: stroke;
    stroke: var(--navy-2);
    stroke-width: 5px;
    stroke-linejoin: round;
}

.channel-link {
    cursor: pointer;
    pointer-events: all;
}

.connection-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 18;
    pointer-events: stroke;
}

.channel-link:hover .connection-line {
    stroke: var(--text);
    stroke-width: 3;
}

.channel-link.selected .connection-line {
    stroke: var(--rose);
    stroke-width: 4;
}

.channel-link.selected .connection-label {
    fill: var(--rose);
}

.agent-card {
    position: absolute;
    z-index: 2;
    width: 174px;
    min-height: 92px;
    border: 1px solid var(--line-strong);
    border-top: 3px solid var(--blue);
    background: rgba(12,31,52,.96);
    border-radius: 9px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 9px 24px rgba(0,0,0,.2);
    transition: .15s ease;
}

    .agent-card:hover {
        transform: translateY(-2px);
        border-color: var(--cyan);
    }

    .agent-card.selected {
        outline: 2px solid var(--cyan);
        outline-offset: 3px;
    }

    .agent-card .card-kind {
        color: var(--blue);
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .09em;
    }

    .agent-card strong {
        display: block;
        font-size: 15px;
        margin: 7px 0 7px;
        overflow-wrap: anywhere;
    }

    .agent-card small {
        color: var(--muted);
        font-size: 11px;
    }

.block-diagram {
    min-width: 520px;
    min-height: 100%;
    height: max-content;
}

.block-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

    .block-header strong {
        font-size: 20px;
    }

    .block-header span {
        color: var(--blue);
        font-size: 12px;
    }

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.process-card {
    min-height: 160px;
    border: 1px solid rgba(184,151,255,.45);
    background: rgba(16,33,57,.9);
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
}

    .process-card:hover {
        border-color: var(--cyan);
    }

    .process-card .card-top {
        color: var(--violet);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: .1em;
        font-weight: 800;
    }

    .process-card strong {
        display: block;
        font-size: 18px;
        margin: 8px 0;
    }

    .process-card p {
        color: var(--muted);
        font-size: 12px;
        margin: 0 0 15px;
    }

.state-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.state-pill {
    padding: 3px 7px;
    color: var(--green);
    background: rgba(122,223,154,.12);
    border-radius: 20px;
    font-size: 10px;
}

.block-channels {
    margin: -8px 0 24px;
}

.block-channel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.block-channel {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 175px;
    border: 1px solid rgba(66,214,210,.35);
    border-radius: 7px;
    padding: 8px 10px;
    color: var(--text);
    background: rgba(66,214,210,.06);
    text-align: left;
}

    .block-channel:hover {
        border-color: var(--cyan);
        background: rgba(66,214,210,.13);
    }

    .block-channel .sdl-icon {
        color: var(--cyan);
        flex: 0 0 auto;
    }

    .block-channel strong {
        display: block;
        font-size: 12px;
    }

    .block-channel small {
        display: block;
        color: var(--muted);
        font-size: 10px;
        margin-top: 2px;
    }

.process-diagram {
    min-width: 760px;
    min-height: 100%;
    height: max-content;
}

.process-summary {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.summary-card {
    min-width: 160px;
    padding: 11px 13px;
    border-radius: 8px;
    background: rgba(255,255,255,.045);
    border: 1px solid var(--line);
}

    .summary-card span {
        display: block;
        color: var(--faint);
        font-size: 10px;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    .summary-card strong {
        display: block;
        margin-top: 4px;
        font-size: 13px;
        color: var(--text);
    }

.flow-area {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    padding: 5px;
}

.start-flow {
    width: 170px;
    flex: 0 0 170px;
}

.flow-title {
    color: var(--cyan);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin: 0 0 11px;
}

.states-flow {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.state-card {
    width: 236px;
    border: 1px solid rgba(122,223,154,.38);
    background: rgba(10,30,49,.95);
    border-radius: 10px;
    padding: 0 12px 12px;
    cursor: pointer;
}

    .state-card:hover {
        border-color: var(--cyan);
    }

.state-title {
    margin: 0 -12px 11px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(122,223,154,.23);
    color: var(--green);
    font-size: 13px;
    font-weight: 750;
}

.flow-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flow-node {
    width: 100%;
    position: relative;
    border-radius: 5px;
    padding: 7px 8px;
    margin-bottom: 18px;
    font-size: 11px;
    border: 1px solid;
    background: rgba(255,255,255,.05);
    color: var(--text);
    min-height: 32px;
    overflow-wrap: anywhere;
}

    .flow-node::after {
        content: "↓";
        position: absolute;
        bottom: -20px;
        left: calc(50% - 4px);
        color: var(--faint);
        font-size: 13px;
    }

    .flow-node:last-child {
        margin-bottom: 0;
    }

        .flow-node:last-child::after {
            display: none;
        }

.node-input {
    border-color: rgba(91,167,255,.55);
}

.node-output {
    border-color: rgba(247,189,97,.6);
}

.node-task {
    border-color: rgba(184,151,255,.55);
}

.node-setstate {
    border-color: rgba(122,223,154,.55);
}

.node-decision {
    transform: rotate(0deg);
    border-color: rgba(255,136,151,.63);
}

.node-procedurecall {
    border-color: rgba(66,214,210,.6);
}

.node-return {
    border-color: rgba(247,189,97,.65);
}

.flow-node .kind {
    display: block;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .08em;
    margin-bottom: 3px;
}

.start-node {
    border-radius: 50%;
    width: 76px;
    height: 76px;
    display: grid;
    place-content: center;
    text-align: center;
    border: 2px solid var(--cyan);
    color: var(--cyan);
    background: rgba(66,214,210,.1);
    font-size: 11px;
    font-weight: 750;
    margin: 9px auto 20px;
}

.procedure-diagram {
    min-width: 500px;
    min-height: 100%;
    height: max-content;
}

.procedure-head {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-bottom: 24px;
}

    .procedure-head strong {
        display: block;
        font-size: 20px;
    }

    .procedure-head p {
        margin: 5px 0 0;
        color: var(--muted);
        font-size: 12px;
    }

.param-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.param-chip {
    background: rgba(247,189,97,.11);
    color: var(--amber);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 15px;
}

.procedure-flow {
    width: 260px;
    margin: 0 auto;
}

.flow-node.clickable {
    cursor: pointer;
}

    .flow-node.clickable:hover {
        border-color: var(--cyan);
    }

.palette-panel {
    flex: 0 0 auto;
}

.panel-copy {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    padding: 0 16px;
    margin: 14px 0;
}

.palette {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 14px 15px;
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    background: rgba(255,255,255,.025);
    text-align: left;
    font-size: 11px;
    font-weight: 600;
}

    .palette-item:hover {
        border-color: var(--cyan);
        color: var(--text);
        background: rgba(66,214,210,.07);
    }

.palette-glyph {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    font-size: 12px;
    border-radius: 4px;
    background: rgba(255,255,255,.08);
    color: var(--cyan);
}

.flow-node.selected {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(66,214,210,.16);
    background: rgba(66,214,210,.1);
}

.tree-icon .sdl-icon {
    width: 15px;
    height: 13px;
}

.palette-glyph {
    width: 24px;
    background: transparent;
}

.sdl-icon {
    width: 23px;
    height: 17px;
    display: block;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: square;
    stroke-linejoin: miter;
}

/* SDL graphical symbols based on ITU-T Z.100. */
.state-card {
    border: 1px dashed rgba(122,223,154,.35);
    border-radius: 7px;
    background: rgba(10,30,49,.62);
    padding: 10px 12px 12px;
}

.state-title {
    margin: -2px 0 13px;
    padding: 8px 12px;
    border: 1.5px solid var(--green);
    border-radius: 999px;
    background: rgba(122,223,154,.08);
    text-align: center;
}

    .state-title small {
        color: rgba(122,223,154,.72);
    }

.flow-node {
    border-radius: 0;
    min-height: 38px;
    padding: 7px 10px;
    margin-bottom: 22px;
    border-width: 1.5px;
}

    .flow-node::after {
        bottom: -23px;
        font-size: 14px;
    }

.node-input {
    clip-path: polygon(0 0,100% 0,100% 100%,0 100%,14% 50%);
    padding-left: 34px;
    border-color: rgba(91,167,255,.88);
    background: rgba(91,167,255,.1);
}

.node-output {
    clip-path: polygon(0 0,84% 0,100% 50%,84% 100%,0 100%);
    padding-right: 31px;
    border-color: rgba(247,189,97,.9);
    background: rgba(247,189,97,.09);
}

.node-task {
    border-color: rgba(184,151,255,.86);
}

.node-procedurecall {
    border-color: rgba(66,214,210,.9);
    padding-left: 17px;
    padding-right: 17px;
    background-image: linear-gradient(90deg,transparent 5px,rgba(66,214,210,.72) 5px,rgba(66,214,210,.72) 6px,transparent 6px,transparent calc(100% - 6px),rgba(66,214,210,.72) calc(100% - 6px),rgba(66,214,210,.72) calc(100% - 5px),transparent calc(100% - 5px));
}

.node-setstate {
    width: 84%;
    min-height: 40px;
    border-radius: 999px;
    padding: 8px 16px;
    border-color: rgba(122,223,154,.9);
    background: rgba(122,223,154,.1);
    text-align: center;
}

.node-decision {
    width: 180px;
    min-height: 86px;
    clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%);
    border-color: rgba(255,136,151,.92);
    padding: 23px 36px;
    background: rgba(255,136,151,.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .node-decision .kind {
        margin-bottom: 3px;
    }

.node-return {
    width: 52px;
    min-height: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    border-color: rgba(247,189,97,.92);
    background: rgba(247,189,97,.08);
    font-size: 0;
    display: grid;
    place-items: center;
}

    .node-return::before {
        content: "×";
        color: var(--amber);
        font-size: 44px;
        font-weight: 200;
        line-height: 1;
    }

    .node-return .kind {
        display: none;
    }

.start-node {
    width: 116px;
    height: 48px;
    border-radius: 999px;
    border-width: 1.5px;
    margin-bottom: 24px;
}

.state-card > .flow-stack {
    align-items: flex-start;
}

    .state-card > .flow-stack > .flow-node {
        width: 210px;
    }

.decision-layout {
    width: max-content;
    min-width: 0;
    margin: 4px 0 28px;
}

.decision-branches {
    display: grid;
    grid-template-columns: repeat(var(--decision-columns, 2), 210px);
    gap: 18px;
    position: relative;
    align-items: start;
}

    .decision-branches::before {
        content: "";
        position: absolute;
        top: 43px;
        left: 150px;
        right: 105px;
        border-top: 1.5px solid rgba(255,136,151,.7);
    }

.decision-branch {
    position: relative;
    min-width: 0;
    padding-top: 104px;
}

    .decision-branch:not(.decision-primary)::before {
        content: "";
        position: absolute;
        top: 43px;
        left: 50%;
        height: 61px;
        border-left: 1.5px solid rgba(255,136,151,.7);
    }

.decision-primary {
    padding-top: 0;
}

    .decision-primary .node-decision {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 14px;
    }

        .decision-primary .node-decision::after {
            bottom: -20px;
        }

.decision-option {
    display: block;
    margin: 0 auto 11px;
    width: max-content;
    max-width: 100%;
    color: var(--rose);
    background: rgba(255,136,151,.1);
    border: 1px solid rgba(255,136,151,.35);
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.decision-primary .decision-option {
    margin-top: 20px;
}

.decision-branch-flow {
    width: 100%;
    align-items: stretch;
}

    .decision-branch-flow .flow-node {
        margin-bottom: 22px;
    }

    .decision-branch-flow .node-decision {
        width: 154px;
        min-height: 76px;
        align-self: center;
        padding: 20px 30px;
    }

.decision-empty {
    min-height: 52px;
    display: grid;
    place-items: center;
    color: var(--faint);
    border: 1px dashed rgba(255,136,151,.45);
    border-radius: 5px;
    padding: 8px;
    font-size: 10px;
    text-align: center;
}

.inspector {
    flex: 1 0 300px;
}

.inspector-form {
    padding: 4px 16px 18px;
}

    .inspector-form label, .dialog label {
        color: var(--muted);
        display: block;
        font-size: 11px;
        font-weight: 650;
        margin-top: 12px;
    }

        .inspector-form label small, .dialog small {
            color: var(--faint);
            font-weight: 500;
        }

    .inspector-form input, .inspector-form select, .inspector-form textarea, .dialog input, .dialog select {
        display: block;
        width: 100%;
        margin-top: 6px;
        background: rgba(3,13,25,.45);
        border: 1px solid var(--line);
        color: var(--text);
        border-radius: 6px;
        padding: 8px 9px;
        outline: none;
        font-size: 12px;
    }

    .inspector-form textarea {
        resize: vertical;
        min-height: 64px;
    }

        .inspector-form input:focus, .inspector-form select:focus, .inspector-form textarea:focus, .dialog input:focus, .dialog select:focus {
            border-color: var(--cyan);
        }

.form-section {
    color: var(--faint);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 800;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 15px;
}

.attribute-note {
    color: var(--faint);
    font-size: 10px;
    padding-top: 11px;
}

.dcl-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.xml-preview {
    position: absolute;
    z-index: 5;
    top: 65px;
    left: 14px;
    right: 14px;
    bottom: 14px;
    overflow: auto;
    background: #071321;
}

    .xml-preview.hidden {
        display: none;
    }

.xml-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
}

    .xml-heading strong {
        font-size: 12px;
    }

.xml-preview pre {
    margin: 0;
    padding: 16px;
    color: #b9d9ee;
    font: 12px/1.55 "Cascadia Code", Consolas, monospace;
    white-space: pre-wrap;
}

.dialog {
    color: var(--text);
    width: min(480px, calc(100vw - 30px));
    border: 1px solid var(--line-strong);
    background: #10263e;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 25px 70px rgba(0,0,0,.55);
}

    .dialog::backdrop {
        background: rgba(1,8,17,.7);
        backdrop-filter: blur(2px);
    }

    .dialog form {
        padding: 18px;
    }

.dialog-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.dialog h2 {
    font-size: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.check-row {
    display: flex !important;
    gap: 8px;
    align-items: center;
}

    .check-row input {
        width: auto !important;
        margin: 0 !important;
        accent-color: var(--cyan);
    }

menu {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0;
    margin: 20px 0 0;
}

.export-dialog {
    width: min(590px, calc(100vw - 30px));
}

.export-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    max-height: 340px;
    overflow: auto;
}

.export-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

    .export-item:last-child {
        border-bottom: 0;
    }

    .export-item strong {
        font-size: 12px;
    }

    .export-item small {
        display: block;
        margin-top: 3px;
        color: var(--faint);
        font-size: 10px;
    }

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    transform: translateY(15px);
    opacity: 0;
    pointer-events: none;
    background: #0b2639;
    border: 1px solid var(--cyan);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 12px;
    box-shadow: var(--shadow);
    transition: .22s ease;
}

    .toast.show {
        opacity: 1;
        transform: translateY(0);
    }

@media (max-width: 1120px) {
    body {
        min-width: 900px;
    }

    .workspace {
        grid-template-columns: 215px minmax(440px,1fr) 275px;
        gap: 10px;
        padding: 10px;
    }

    .app-header {
        gap: 18px;
        padding: 0 16px;
    }

    .header-actions .secondary {
        display: none;
    }
}
