.dbq-app {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
  margin: 24px 0;
  font-family: inherit;
  color: #0f172a;
}

.dbq-sidebar,
.dbq-canvas-wrap,
.dbq-form {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #d9dee5;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.dbq-sidebar {
  padding: 22px;
  position: sticky;
  top: 20px;
  overflow: hidden;
}

.dbq-sidebar::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, #163f7a 0%, #1d4ed8 50%, #d2a351 100%);
}

.dbq-brand-lockup {
  margin-bottom: 8px;
}

.dbq-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e6efff;
  color: #163f7a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dbq-sidebar h3,
.dbq-form h3,
.dbq-summary h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #111827;
}

.dbq-help {
  margin: 0 0 16px;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

.dbq-panel-section {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.dbq-section-title {
  margin: 0 0 12px;
  color: #163f7a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dbq-component-picker label,
.dbq-dock-type-picker label,
.dbq-dock-type-picker label,
.dbq-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1f2937;
}

.dbq-component-picker select,
.dbq-dock-type-picker select,
.dbq-dock-type-picker select,
.dbq-form input,
.dbq-form textarea {
  width: 100%;
  border: 1px solid #94a3b8;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: #111827;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dbq-component-picker select:focus,
.dbq-dock-type-picker select:focus,
.dbq-dock-type-picker select:focus,
.dbq-form input:focus,
.dbq-form textarea:focus,
.dbq-action-button:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.dbq-component-picker {
  display: grid;
  gap: 10px;
}

.dbq-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dbq-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.10);
}

.dbq-action-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.10);
}

.dbq-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 16px;
  font-weight: 800;
}

.dbq-action-button.is-primary {
  background: linear-gradient(180deg, #1d4ed8 0%, #163f7a 100%);
  color: #ffffff;
}

.dbq-action-button.is-secondary {
  background: linear-gradient(180deg, #0f766e 0%, #115e59 100%);
  color: #ffffff;
}

.dbq-action-button.is-danger {
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
}

.dbq-action-button.is-neutral {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border-color: #cbd5e1;
  color: #111827;
}

.dbq-action-button.is-neutral .dbq-button-icon {
  background: rgba(15, 23, 42, 0.08);
}

.dbq-submit-button {
  width: auto;
  min-width: 200px;
}

.dbq-selected-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 18px;
}

.dbq-summary {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.dbq-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dbq-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #163f7a;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
}

.dbq-summary-empty {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
}

.dbq-summary-item {
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #f8fafc;
  color: #1f2937;
}

.dbq-summary-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dbq-summary-color {
  width: 14px;
  height: 42px;
  border-radius: 999px;
  flex: 0 0 14px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.dbq-summary-name {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
}

.dbq-summary-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #475569;
}

.dbq-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dbq-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 12px;
  font-weight: 700;
}

.dbq-tag.is-selected {
  background: #dbeafe;
  color: #1d4ed8;
}

.dbq-summary-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.10);
}

.dbq-main {
  min-width: 0;
}

.dbq-canvas-wrap {
  overflow: hidden;
}

.dbq-canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
  color: #334155;
  font-size: 14px;
}

#dbq-canvas {
  position: relative;
  min-height: 720px;
  background-color: #0c4a6e;
  background-image:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 34%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px),
    linear-gradient(0deg, rgba(2, 132, 199, 0.34) 0%, rgba(7, 89, 133, 0.66) 52%, rgba(8, 47, 73, 0.92) 100%),
    linear-gradient(to right, rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 160px 160px, 220px 220px, 100% 100%, 20px 20px, 20px 20px;
  overflow: auto;
}

#dbq-canvas::before {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  height: 72px;
  margin-top: calc(720px - 72px);
  background:
    linear-gradient(0deg, rgba(250, 245, 235, 0.96) 0%, rgba(226, 216, 190, 0.86) 56%, rgba(12, 74, 110, 0) 100%);
  border-top: 0;
  pointer-events: none;
  z-index: 1;
}

.dbq-shore-side-marker {
  position: absolute;
  top: auto;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
}

.dbq-shore-arrow {
  font-size: 18px;
  line-height: 1;
}

.dbq-piece {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border: 2px solid rgba(255,255,255,0.88);
  border-radius: 8px;
  color: #102033;
  cursor: move;
  padding: 8px;
  text-align: center;
  box-shadow: 0 10px 22px rgba(8, 47, 73, 0.28);
  transform-origin: center center;
}

.dbq-piece span,
.dbq-piece small {
  pointer-events: none;
}

.dbq-piece span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.dbq-piece small {
  font-size: 11px;
  opacity: 0.8;
}

.dbq-piece.is-selected {
  outline: 3px solid #111827;
  outline-offset: 2px;
}

.dbq-form {
  margin-top: 24px;
  padding: 20px;
}

.dbq-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dbq-form-grid p:last-child {
  grid-column: 1 / -1;
}

#dbq-form-response {
  margin-top: 12px;
  font-weight: 700;
}

.dbq-success {
  color: #166534;
}

.dbq-error {
  color: #b91c1c;
}

@media (max-width: 960px) {
  .dbq-app {
    grid-template-columns: 1fr;
  }

  .dbq-sidebar {
    position: static;
  }

  .dbq-form-grid {
    grid-template-columns: 1fr;
  }

  .dbq-submit-button {
    width: 100%;
  }
}


.dbq-field-note {
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.dbq-action-button:disabled,
.dbq-component-picker select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
