.canvas-page .main-content {
    padding: 0;
    height: calc(100vh - 56px);
    overflow: hidden;
}

.canvas-layout {
    display: flex;
    height: 100%;
}

.canvas-sidebar {
    width: 230px;
    background: var(--surface-container-lowest);
    border-right: 1px solid var(--outline-variant);
    padding: var(--space-md) var(--space-sm);
    overflow-y: auto;
}

.canvas-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.canvas-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-container-lowest);
    border-bottom: 1px solid var(--outline-variant);
    gap: var(--space-sm);
}

#drawflow {
    flex: 1;
    background-color: var(--surface);
    background-image: radial-gradient(circle, var(--surface-variant) 1px, transparent 1px);
    background-size: 20px 20px;
}

.widget-category {
    margin-bottom: var(--space-md);
}

.widget-category h4 {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-sm);
    padding: 0 var(--space-xs);
}

.widget-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: grab;
    transition: background 0.12s;
    margin-bottom: 2px;
    color: var(--on-surface);
}

.widget-item:hover {
    background: var(--surface-container);
}

.widget-item:active {
    cursor: grabbing;
}

.widget-item .material-symbols-outlined {
    font-size: 1.125rem;
}

.widget-item[data-type="data"] .material-symbols-outlined { color: var(--primary); }
.widget-item[data-type="viz"] .material-symbols-outlined { color: var(--secondary); }
.widget-item[data-type="model"] .material-symbols-outlined { color: var(--tertiary); }
.widget-item[data-type="qual"] .material-symbols-outlined { color: #7c5ebd; }

/* Drawflow node customization */
.drawflow .drawflow-node {
    border-radius: var(--radius);
    border: 1px solid var(--outline-variant);
    background: var(--surface-container-lowest);
    min-width: 140px;
    box-shadow: var(--shadow);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.drawflow .drawflow-node:hover {
    box-shadow: var(--shadow-lg);
}

.drawflow .drawflow-node.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(151, 73, 0, 0.15);
}

.drawflow .drawflow-node .drawflow_content_node {
    padding: 10px 15px;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--on-surface);
}

/* Connection lines */
.drawflow .connection .main-path {
    stroke: var(--outline);
    stroke-width: 2;
}

.drawflow .connection .main-path:hover {
    stroke: var(--secondary);
}

/* Socket connectors */
.drawflow .drawflow-node .input,
.drawflow .drawflow-node .output {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--outline);
    background: var(--surface-container-lowest);
    transition: all 0.12s;
}

.drawflow .drawflow-node .input:hover,
.drawflow .drawflow-node .output:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Node category top-border colors */
.node-data .drawflow_content_node {
    border-top: 3px solid var(--primary-container);
}
.node-viz .drawflow_content_node {
    border-top: 3px solid var(--secondary);
}
.node-model .drawflow_content_node {
    border-top: 3px solid var(--tertiary);
}
.node-qual .drawflow_content_node {
    border-top: 3px solid var(--secondary-fixed);
}

/* Error state for nodes */
.drawflow .drawflow-node.error {
    border-color: var(--error);
}

.drawflow .drawflow-node.error .drawflow_content_node {
    border-top-color: var(--error);
}
