/* VC-0A — grade única do painel Dados do Construtor. */
body.report-editor-active:not(.viewer-mode) #appShell.biwa-enterprise-ui .data-pane .enhanced-field-row {
  display: grid;
  grid-template-columns: 16px 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 5px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.report-editor-active:not(.viewer-mode) #appShell.biwa-enterprise-ui .data-pane .enhanced-field-row > input[type="checkbox"] {
  grid-column: 1;
  justify-self: center;
  width: 14px;
  height: 14px;
  margin: 0;
}

body.report-editor-active:not(.viewer-mode) #appShell.biwa-enterprise-ui .data-pane .enhanced-field-row > .field-type-icon {
  grid-column: 2;
  width: 20px;
  min-width: 20px;
  height: 17px;
  margin: 0;
  font-style: normal;
}

body.report-editor-active:not(.viewer-mode) #appShell.biwa-enterprise-ui .data-pane .enhanced-field-row > .field-name {
  grid-column: 3;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.report-editor-active:not(.viewer-mode) #appShell.biwa-enterprise-ui .data-pane .enhanced-field-row > .field-row-meta {
  display: none !important;
}

body.report-editor-active:not(.viewer-mode) #appShell.biwa-enterprise-ui .data-pane .builder-measure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 0;
  min-width: 0;
}

body.report-editor-active:not(.viewer-mode) #appShell.biwa-enterprise-ui .data-pane .builder-measure-row > .enhanced-field-row {
  min-width: 0;
  border-radius: 6px 0 0 6px;
}

body.report-editor-active:not(.viewer-mode) #appShell.biwa-enterprise-ui .data-pane .builder-measure-row > .measure-row-actions {
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 30px;
  padding: 0;
}
#homeTab .biwa-home-preview-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
}
#homeTab .biwa-home-preview-banner strong { color: #1d4ed8; letter-spacing: .04em; }
#homeTab .biwa-home-preview-banner p { margin: 4px 0 0; color: #334155; overflow-wrap: anywhere; }
#homeTab.biwa-home-preview-active .biwa-home-intro h3 { overflow-wrap: anywhere; }

body:not(.viewer-mode) .biwa-home-modal .biwa-home-preview-filter-context {
  display: grid;
  gap: 12px;
  max-height: min(52vh, 440px);
  padding: 12px;
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

body:not(.viewer-mode) .biwa-home-modal .biwa-home-preview-context-note,
body:not(.viewer-mode) .biwa-home-modal .biwa-home-preview-context-head p,
body:not(.viewer-mode) .biwa-home-modal .biwa-home-preview-context-ok p {
  margin: 4px 0 0;
  color: #475569;
}

body:not(.viewer-mode) .biwa-home-modal .biwa-home-preview-filter {
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

body:not(.viewer-mode) .biwa-home-modal .biwa-home-preview-filter > span,
body:not(.viewer-mode) .biwa-home-modal .biwa-home-preview-filter > span small {
  overflow-wrap: anywhere;
}

body:not(.viewer-mode) .biwa-home-modal .biwa-home-preview-domain-empty {
  color: #b45309;
}

/* VC-0C — compactacao visual segura da tela Inserir Dados. */
body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-data-layout {
  gap: 12px;
  margin-bottom: 0;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-data-left-col {
  gap: 12px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel.biwa-panel {
  flex: 0 0 auto;
  padding: 12px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .biwa-panel__header {
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .soft-eyebrow {
  margin-bottom: 2px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .panel-head h3 {
  margin-bottom: 2px;
  font-size: 15px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel.biwa-panel .insert-source-grid {
  grid-template-columns: minmax(180px, 1.2fr) minmax(155px, 1fr) minmax(135px, .9fr);
  gap: 8px 10px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .insert-actions-col {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, max-content));
  justify-content: end;
  align-items: center;
  gap: 6px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .insert-actions-col .biwa-btn {
  width: auto;
  min-height: 34px;
  padding: 6px 10px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab #insertColumnsPreview {
  min-height: 44px;
  max-height: 126px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab #insertColumnsPreview.empty-state {
  min-height: 44px;
  padding: 8px 10px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .modelo-panel {
  margin-top: 0;
  padding: 12px;
}

body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .modelo-panel .panel-head {
  margin-bottom: 8px;
}

@media (min-width: 1501px) {
  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel.biwa-panel .insert-source-grid {
    grid-template-columns: minmax(180px, 1.2fr) minmax(155px, 1fr) minmax(135px, .9fr) max-content;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .insert-actions-col {
    grid-column: auto;
  }
}

@media (max-width: 1100px) {
  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-data-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 4px;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-data-left-col {
    flex: 0 0 520px;
    min-height: 520px;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .hidden-tables-panel {
    flex: 0 0 185px;
  }
}

@media (max-width: 820px) and (min-width: 641px) {
  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-data-left-col {
    flex-basis: 600px;
    min-height: 600px;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel.biwa-panel .insert-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .insert-source-grid > label:first-child,
  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .insert-actions-col {
    grid-column: 1 / -1;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .insert-actions-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .insert-actions-col .biwa-btn {
    width: 100%;
    min-height: 40px;
  }
}

@media (max-width: 640px) {
  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-data-left-col {
    flex: 0 0 auto;
    min-height: 0;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .biwa-panel__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel #insertDataStatus {
    align-self: flex-start;
    max-width: 100%;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel.biwa-panel .insert-source-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .insert-actions-col {
    grid-column: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .insert-mysql-panel .insert-actions-col .biwa-btn {
    width: 100%;
    min-height: 40px;
  }

  body:not(.viewer-mode) #appShell.biwa-enterprise-ui #schemaTab .modelo-panel {
    flex: 0 0 300px;
    min-height: 300px;
  }
}
