.dxf-design-layer-heading {
    font-weight: 600;
    margin: 0 0 6px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.dxf-code {
    font-family: monospace;
}

.dxf-stage-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 12px;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #ddd;
}

.dxf-colour-input {
    min-width: 56px;
    padding: 2px !important;
}

.dxf-stage-table td,
.dxf-stage-table th {
    vertical-align: middle !important;
}

.dxf-design-disabled {
    opacity: 0.55;
}


.dxf-survey-timeline {
    position: absolute !important;
    top: 10px;
    left: 50%;
    z-index: 1000;
    transform: translateX(-50%);
    pointer-events: auto;
}

.dxf-survey-timeline-compact {
    display: flex;
    align-items: stretch;
    min-width: 250px;
    max-width: min(360px, calc(100% - 190px));
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.28);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.dxf-survey-timeline button {
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.dxf-survey-timeline button:first-child {
    border-right: 1px solid #ccc;
}

.dxf-survey-timeline button:last-child {
    border-left: 1px solid #ccc;
}

.dxf-survey-timeline button:hover:not(:disabled) {
    background: #f1f1f1;
}

.dxf-survey-timeline button:disabled {
    opacity: 0.35;
    cursor: default;
}

.dxf-timeline-select-label {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    background: #fff;
}

.dxf-timeline-label-text {
    flex: 0 0 auto;
    padding: 0 8px 0 10px;
    color: #555;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dxf-timeline-select {
    min-width: 0;
    width: 100%;
    height: 38px;
    padding: 0 28px 0 4px;
    border: 0;
    outline: 0;
    background: #fff;
    color: #222;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-overflow: ellipsis;
}

@media (max-width: 760px) {
    .dxf-survey-timeline {
        top: 48px;
    }

    .dxf-survey-timeline-compact {
        min-width: 0;
        width: calc(100% - 24px);
        max-width: none;
    }

    .dxf-timeline-label-text {
        display: none;
    }
}

.dxf-design-control {
    background: transparent;
    border: 0 !important;
    box-shadow: none !important;
}

.dxf-design-control-button {
    display: block;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: #fff;
    color: #333;
    font-size: 16px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.dxf-design-control-button:hover {
    background: #f4f4f4;
}

.dxf-design-control-panel {
    position: absolute;
    top: 0;
    right: 42px;
    width: min(360px, calc(100vw - 100px));
    max-height: min(70vh, 620px);
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.dxf-design-control-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border-bottom: 1px solid #ddd;
}

.dxf-design-control-close {
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #555;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.dxf-design-control-content {
    max-height: calc(min(70vh, 620px) - 44px);
    overflow: auto;
    padding: 8px 10px 10px;
}

.dxf-design-group {
    margin: 0 0 10px;
    padding: 0 0 8px;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
}

.dxf-design-group:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

.dxf-design-group-title {
    width: 100%;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    color: #222;
    font-size: 13px;
}

.dxf-design-parent-label,
.dxf-design-layer-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    cursor: pointer;
}

.dxf-design-parent-label {
    font-weight: 600;
}

.dxf-design-children {
    padding-left: 20px;
}

.dxf-design-layer-row {
    min-height: 26px;
    font-weight: 400;
}

.dxf-design-layer-swatch {
    flex: 0 0 18px;
    height: 3px;
    border-radius: 1px;
}

.dxf-design-layer-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dxf-design-layer-error {
    opacity: 0.5;
    text-decoration: line-through;
}

@media (max-width: 700px) {
    .dxf-design-control-panel {
        right: 40px;
        width: calc(100vw - 70px);
    }
}
