.upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.upload-row-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-row .file-name {
    max-width: 200px;
    overflow: hidden;
    color: #666;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-row .orientation {
    margin: 0;
}

.upload-row .btn-primary {
    white-space: nowrap;
}

#all-floors-canvas {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border: 1px solid #ddd;
    box-sizing: border-box;
    overflow: hidden;
}

#all-floors-canvas.layout-portrait {
    max-width: 800px;
    aspect-ratio: 210 / 297;
}

#all-floors-canvas.layout-landscape {
    max-width: 1100px;
    aspect-ratio: 297 / 210;
}

.floors-grid {
    display: grid;
    flex: 1;
    gap: 20px;
    min-height: 0;
    align-content: start;
}

#all-floors-canvas.cols-1 .floors-grid { grid-template-columns: 1fr; }
#all-floors-canvas.cols-2 .floors-grid { grid-template-columns: repeat(2, 1fr); }
#all-floors-canvas.cols-3 .floors-grid { grid-template-columns: repeat(3, 1fr); }

.floor-block {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    min-height: 0;
    overflow: hidden;
}

.floors-grid .floor-block {
    height: 100%;
}

.floor-block-title {
    display: none;
}

.floor-svg-wrapper {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

.svg-scale-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.floor-svg-wrapper svg {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.totals-under-svg {
    flex-shrink: 0;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
}

.totals-under-svg div {
    margin-bottom: 3px;
}

#downloadLoader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(3px);
    font-size: 22px;
    font-weight: bold;
    color: #333;
}

#downloadLoader.show {
    animation: fadeInLoader 0.15s ease-out forwards;
}

@keyframes fadeInLoader {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fml-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 60px;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 130px;
}

.legend-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border: 2px solid #333;
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.legend-label {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
}

.border-dashed {
    background: transparent !important;
    border: 2px dashed #333;
}

#all-floors-legend {
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

#all-floors-legend .fml-legend {
    gap: 8px;
    margin-bottom: 0;
}

#all-floors-legend .legend-item {
    width: 110px;
}

#all-floors-legend .legend-box {
    width: 50px;
    height: 50px;
    font-size: 11px;
}

#all-floors-legend .legend-label {
    font-size: 9px;
}

#all-floors-legend .legend-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
}
