.grid-stack {
  background: #111827;
  min-height: 80vh;
}

.grid-stack-item-content {
  background: #1f2937;
  color: white;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
}

.lab-widget-title {
  font-weight: bold;
  margin-bottom: 8px;
  color: #f97316;
}

.lab-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.lab-toolbar button {
  background: #f97316;
  color: black;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
}

.lab-video-box {
  background: #000;
  height: calc(100% - 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 8px;
  color: #9ca3af;
}

.lab-toolbar {
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
  flex-wrap:wrap;
}

.lab-toolbar input {
  background:#001800;
  color:#00ff66;
  border:1px solid #00ff66;
  padding:6px;
  font-family:monospace;
}

.lab-builder {
  display:grid;
  grid-template-columns:300px 1fr;
  gap:12px;
}

.widget-palette {
  border:1px solid #00ff66;
  background:#001000;
  padding:10px;
  min-height:70vh;
}

.palette-widget {
  border:1px solid #00aa44;
  padding:8px;
  margin:8px 0;
  background:#000;
}

.palette-widget p {
  font-size:12px;
  opacity:.75;
}

.lab-workspace {
  min-width:0;
}

.widget-actions {
  position:absolute;
  right:8px;
  top:8px;
  z-index:20;
}

.widget-actions button,
.palette-widget button,
.lab-toolbar button {
  background:#001800;
  color:#00ff66;
  border:1px solid #00ff66;
  font-family:monospace;
  padding:5px 8px;
  cursor:pointer;
}

.widget-actions button:hover,
.palette-widget button:hover,
.lab-toolbar button:hover {
  background:#003300;
}

.grid-stack-item-content {
  overflow:hidden !important;
}


/* ---- Vision Lab cleanup v1 ---- */
.lab-builder,
.lab-designer,
.lab-workspace {
    display: flex;
    flex-direction: column;
}

.widget-palette,
.widget-toolbox,
.lab-widget-palette,
.builder-sidebar {
    order: 99;
    width: 100%;
    max-width: none;
    margin-top: 24px;
    border-top: 1px solid rgba(0,255,120,.35);
}

.builder-sidebar {
    position: relative;
    left: auto;
    right: auto;
}

.widget-palette .widget-list,
.widget-toolbox .widget-list,
.lab-widget-palette .widget-list,
.builder-sidebar .widget-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.delete-lab-btn,
.lab-delete-btn {
    border: 1px solid rgba(255,80,80,.7);
    color: #ff8080;
    background: rgba(80,0,0,.25);
}


/* ---- Vision Lab cleanup v2: bottom widget toolbox ---- */
.widget-palette,
.widget-toolbox,
.lab-widget-palette,
.builder-sidebar {
  width: 100% !important;
  max-width: none !important;
  margin-top: 24px !important;
  border-top: 1px solid rgba(36,211,107,.35);
  padding-top: 16px;
}

.lab-builder,
.lab-designer,
.lab-workspace,
.builder-layout {
  display: flex;
  flex-direction: column;
}

.lab-canvas,
.grid-stack,
.builder-main,
.lab-main {
  order: 1;
}

.widget-palette,
.widget-toolbox,
.lab-widget-palette,
.builder-sidebar {
  order: 99;
}

.builder-sidebar .widget-list,
.widget-palette .widget-list,
.widget-toolbox .widget-list,
.lab-widget-palette .widget-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
