/* 科室布局页：专业组 RadioGroup 横向排列（覆盖 NeoUI 默认 grid） */
.department-layout-work-section-radio {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: center !important;
    width: 100%;
    min-height: 2rem;
    column-gap: 1rem;
    row-gap: 0.25rem;
}

.department-layout-work-section-radio > div {
    width: auto !important;
    flex: 0 0 auto;
}

/* 科室布局图节点样式（全局，供 DiagramCanvas 内自定义节点使用） */

.work-section-diagram-node,
.layout-shape-node {
    position: relative;
    box-sizing: border-box;
}

.work-section-diagram-node {
    min-height: 48px;
    padding: 10px 12px;
    border: 2px solid #2563eb;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 4px 12px rgb(37 99 235 / 0.15);
    font-size: 12px;
    line-height: 1.4;
    cursor: grab;
    user-select: none;
}

.work-section-diagram-node__title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}

.work-section-diagram-node__name {
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
}

.work-section-diagram-node__code {
    font-size: 11px;
    color: #64748b;
    background: #eff6ff;
    padding: 1px 6px;
    border-radius: 4px;
}

.work-section-diagram-node__location {
    margin-bottom: 6px;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-section-diagram-node__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #64748b;
    font-size: 11px;
}

.layout-shape-node {
    overflow: visible;
    cursor: grab;
    user-select: none;
}

.layout-shape-node__body {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: 2px dashed #64748b;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.layout-shape-node__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    pointer-events: none;
}

.layout-shape-node__title {
    font-weight: 600;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout-shape-node__body-text {
    font-size: 10px;
    font-weight: 400;
    line-height: 1.3;
    color: #64748b;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layout-shape-node__body--corridor {
    border-style: solid;
    border-color: #4ade80;
    background: #dcfce7;
    border-radius: 4px;
}

.layout-shape-node__body--door {
    border-style: solid;
    border-color: #0ea5e9;
    background: #e0f2fe;
}

.layout-shape-node__body--emergency-exit {
    border-style: solid;
    border-color: #15803d;
    background: #22c55e;
    border-radius: 6px;
}

.layout-shape-node__body--bsc {
    border-color: #059669;
    background: #d1fae5;
}

.layout-shape-node__body--fridge {
    border-color: #0284c7;
    background: #e0f2fe;
}

.layout-shape-node__body--waste {
    border-color: #dc2626;
    background: #fee2e2;
}

.layout-shape-node__body--instrument {
    border-color: #2563eb;
    background: #eff6ff;
}

.layout-shape-node__body--equipment.layout-shape-node__body--post {
    border-color: #d97706;
    background: linear-gradient(180deg, #fef3c7, #fde68a);
    box-shadow: 0 1px 3px rgb(217 119 6 / 0.18);
}

.layout-shape-node--post .layout-shape-node__icon {
    color: rgb(217 119 6 / 0.9);
}

.layout-shape-node__body--bench {
    border-style: solid;
    border-color: #78716c;
    border-radius: 3px;
    background: repeating-linear-gradient(
        -45deg,
        #e7e5e4 0,
        #e7e5e4 8px,
        #d6d3d1 8px,
        #d6d3d1 16px
    );
}

.layout-shape-node--room {
    overflow: visible;
}

.layout-shape-node__external-label {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding-bottom: 6px;
    text-align: center;
    pointer-events: none;
}

.layout-shape-node__title--external {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    text-align: center;
}

.layout-shape-node__external-body {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center;
    font-size: 10px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.layout-shape-node__body--rectangle {
    border-style: solid;
    border-width: 4px;
    border-color: #475569;
    border-radius: 4px;
    background: #f8fafc;
}

.layout-shape-node__body--room {
    padding: 0;
}

.layout-shape-node__body--specimen,
.layout-shape-node__body--sink {
    border-style: solid;
    border-color: #64748b;
}

.layout-shape-node__body--equipment {
    flex-direction: column;
    gap: 4px;
    border-style: solid;
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.08);
}

.layout-shape-node__icon {
    flex-shrink: 0;
    pointer-events: none;
}

.layout-shape-node__title--equipment {
    font-size: 11px;
}

.layout-shape-node__body-text--equipment {
    font-size: 9px;
}

.work-section-diagram-node--selected,
.layout-shape-node--selected {
    box-shadow: 0 0 0 2px #f59e0b;
}

.diagram-node-resize-handle {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 22px;
    height: 22px;
    background: #f59e0b;
    border: 2px solid #ffffff;
    border-radius: 4px;
    cursor: nwse-resize;
    z-index: 30;
    touch-action: none;
    pointer-events: auto;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
}

.diagram-node-resize-handle:hover {
    background: #d97706;
}

.diagram-node-resize-handle--hidden {
    visibility: hidden;
    pointer-events: none;
}
