.floor-plan-editor {
    max-width: 1600px;
    margin-inline: auto;
    color: #1e293b;
}

.floor-plan-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 10px;
    align-items: stretch;
}

.floor-plan-tool-group,
.floor-plan-save-group,
.floor-plan-selection-panel {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}

.floor-plan-tool-heading {
    flex-basis: 100%;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.floor-plan-tool-controls {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.floor-plan-tool-controls label,
.floor-plan-selection-panel label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.floor-plan-tool-controls input,
.floor-plan-tool-controls select,
.floor-plan-selection-panel input,
.floor-plan-selection-panel select {
    min-height: 36px;
    max-width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    padding: 6px 8px;
    color: #1e293b;
}

.floor-plan-tool-button,
.floor-plan-secondary-button {
    min-height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    padding: 7px 11px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.floor-plan-tool-button:hover,
.floor-plan-secondary-button:hover { background: #e2e8f0; }

.floor-plan-tool-button.active {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
    box-shadow: 0 0 0 2px rgb(59 130 246 / 18%);
}

.floor-plan-save-group { justify-content: flex-end; }

.floor-plan-canvas {
    max-width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    overscroll-behavior: contain;
}

.floor-plan-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
}

.floor-plan-legend i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid rgb(15 23 42 / 25%);
    border-radius: 50%;
}

.floor-plan-legend .available { background: #4caf50; }
.floor-plan-legend .booked { background: #2196f3; }
.floor-plan-legend .occupied { background: #f44336; }
.floor-plan-legend .billed { background: #ff9800; }

.floor-plan-selection-panel { justify-content: flex-start; }
.floor-plan-selection-panel strong { margin-right: 4px; color: #0f172a; }

@media (max-width: 640px) {
    .floor-plan-toolbar { grid-template-columns: minmax(0, 1fr); }
    .floor-plan-tool-group,
    .floor-plan-save-group { padding: 9px; }
    .floor-plan-tool-controls > * { flex: 1 1 auto; }
    .floor-plan-tool-controls button { flex: 1 1 42%; }
    .floor-plan-selection-panel > * { flex: 1 1 40%; }
    .floor-plan-save-group button { width: 100%; }
}
