.fleet-builder-container { display: none; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; }
    .builder-layout { display: flex; height: 85vh; }
    
    /* Ліва панель */
    .builder-sidebar { width: 260px; background: white; border-right: 1px solid #e2e8f0; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; }
    .palette-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; cursor: grab; background: #f8fafc; font-weight: 500; font-size: 13px; transition: 0.2s; user-select: none; }
    .palette-item:hover { background: #e0e7ff; border-color: #a5b4fc; color: #3730a3; }
    .palette-preview { width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: bold; border: 1px solid rgba(0,0,0,0.1); }
    
    .palette-create-block { border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; margin-top: 12px; overflow: hidden; }
    .palette-create-toggle { width: 100%; border: none; background: transparent; padding: 10px 12px; font-size: 13px; font-weight: 600; color: #2563eb; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
    .palette-create-toggle:hover { background: #eff6ff; }
    .palette-create-body { display: none; padding: 0 12px 12px; border-top: 1px solid #e2e8f0; }
    .palette-create-block.open .palette-create-body { display: block; }
    .palette-create-block.open .palette-create-chevron { transform: rotate(180deg); }
    .palette-create-chevron { transition: transform 0.2s; }
    .palette-create-body .form-label { font-size: 11px; text-transform: uppercase; color: #64748b; font-weight: 700; margin-bottom: 4px; }
    .palette-create-body .form-control, .palette-create-body .form-select { font-size: 13px; }
    
    /* Центральна область */
    .builder-canvas-area { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 24px 20px 150px 20px; overflow-y: auto; background: #e2e8f0; position: relative; }
    
    .bus-deck-toolbar { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 16px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
    .bus-floor-tabs { display: flex; gap: 8px; }
    .bus-floor-tabs .btn.active { background: #2563eb; border-color: #2563eb; color: #fff; }
    
    /* Зовнішня оболонка ресайзу — стабілізує бордери/фон внутрішнього холста */
    .bus-canvas-shell {
        resize: both;
        overflow: hidden;
        min-width: 200px;
        min-height: 400px;
        max-width: 800px;
        max-height: 3500px;
        width: 320px;
        height: 800px;
        box-sizing: border-box;
        position: relative;
        flex-shrink: 0;
    }
    
    .bus-canvas { 
        width: 100%;
        height: 100%;
        box-sizing: border-box;
        background: white;
        border: 4px solid #64748b; 
        border-radius: 60px 60px 10px 10px;
        position: relative;
        background-image: linear-gradient(#f1f5f9 1px, transparent 1px), linear-gradient(90deg, #f1f5f9 1px, transparent 1px);
        background-size: 20px 20px;
        background-origin: padding-box;
        background-clip: padding-box;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        resize: none;
        overflow: hidden;
    }
    
    .bus-front-glass { position: absolute; top: 10px; left: 20px; right: 20px; height: 30px; background: #cbd5e1; border-radius: 30px 30px 5px 5px; opacity: 0.5; pointer-events: none; }
    .bus-steering-wheel { position: absolute; top: 50px; left: 40px; font-size: 24px; color: #475569; pointer-events: none; }

    .drag-element { 
        position: absolute; display: flex; align-items: center; justify-content: center; 
        font-weight: bold; font-size: 13px; cursor: move; user-select: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: box-shadow 0.2s;
        box-sizing: border-box; overflow: hidden; text-align: center; line-height: 1.1;
        resize: both; 
        min-width: 20px; 
        min-height: 20px;
        max-width: none;
        width: auto;
        height: auto;
    }
    .drag-element:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 10; }
    .drag-element.selected { outline: 3px solid #ef4444; outline-offset: 2px; z-index: 11; }

    /* Права панель */
    .builder-settings { width: 280px; background: white; border-left: 1px solid #e2e8f0; padding: 20px; display: flex; flex-direction: column; overflow-y: auto; }
    
    .bus-photo-preview { position: relative; display: inline-block; margin-right: 10px; margin-bottom: 10px; }
    .bus-photo-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid #cbd5e1; }
    .bus-photo-del { position: absolute; top: -5px; right: -5px; background: #ef4444; color: white; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
    
    .plate-badge { background: #f8fafc; border: 1px solid #cbd5e1; padding: 4px 8px; border-radius: 6px; font-weight: bold; font-family: monospace; letter-spacing: 1px; color: #334155; }
    #paletteContextMenu { display: none; position: fixed; z-index: 1080; min-width: 180px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 10px 25px rgba(15,23,42,0.12); padding: 6px; }
    #paletteContextMenu button { width: 100%; text-align: left; border: none; background: transparent; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #1e293b; }
    #paletteContextMenu button:hover { background: #f1f5f9; }
    #paletteContextMenu button.danger { color: #dc2626; }

.bus-renderer-tabs { display:flex; gap:8px; justify-content:center; margin-bottom:12px; }
.bus-renderer-tabs button { border-radius:20px; padding:6px 16px; font-weight:700; font-size:13px; cursor:pointer; }
.bus-renderer-tabs button.active { background:#2563eb; color:#fff; border:1px solid #2563eb; }
.bus-renderer-tabs button:not(.active) { background:#fff; color:#334155; border:1px solid #e2e8f0; }
