.streab-mindmaps-section {
  min-height: calc(100vh - 120px);
  color: var(--text-primary);
}

.mindmaps-shell {
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  gap: 18px;
  height: calc(100vh - 128px);
  min-height: 720px;
}

.mindmaps-library,
.mindmaps-workbench,
.mindmaps-panel,
.mindmaps-card {
  background: var(--streab-surface, rgba(26, 26, 31, 0.86));
  border: 1px solid var(--streab-border, rgba(255, 255, 255, 0.09));
  border-radius: 8px;
  box-shadow: var(--streab-shadow-soft, 0 24px 70px rgba(0, 0, 0, 0.32));
  backdrop-filter: blur(18px) saturate(130%);
}

.mindmaps-library {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mindmaps-library-header,
.mindmaps-editor-header,
.mindmaps-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mindmaps-library-title,
.mindmaps-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.mindmaps-library-actions,
.mindmaps-toolbar,
.mindmaps-preview-tools,
.mindmaps-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mindmaps-button,
.mindmaps-icon-button,
.mindmaps-select,
.mindmaps-input,
.mindmaps-textarea {
  border: 1px solid var(--streab-border, rgba(255, 255, 255, 0.12));
  background: var(--streab-surface-2, rgba(12, 12, 15, 0.9));
  color: var(--text-primary);
  border-radius: 8px;
  font-family: var(--streab-font, inherit);
}

.mindmaps-button,
.mindmaps-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.mindmaps-icon-button {
  width: 38px;
  padding: 0;
}

.mindmaps-button:hover,
.mindmaps-icon-button:hover {
  transform: translateY(-1px);
  background: var(--primary-accent);
  border-color: var(--primary-accent);
}

.mindmaps-button.primary {
  background: linear-gradient(135deg, var(--streab-blue, var(--primary-accent)), var(--streab-violet, #14b8a6));
  border-color: transparent;
  color: white;
  font-weight: 700;
}

.mindmaps-button.danger:hover,
.mindmaps-icon-button.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.mindmaps-input,
.mindmaps-select {
  min-height: 38px;
  padding: 0 12px;
  outline: none;
}

.mindmaps-input:focus,
.mindmaps-select:focus,
.mindmaps-textarea:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.28);
}

.mindmaps-search {
  padding: 14px 16px;
}

.mindmaps-search .mindmaps-input {
  width: 100%;
}

.mindmaps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 14px;
  overflow: auto;
}

.mindmap-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: var(--streab-soft, rgba(255, 255, 255, 0.035));
  cursor: pointer;
}

.mindmap-item:hover,
.mindmap-item.active {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(59, 130, 246, 0.14);
}

.mindmap-item-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.mindmap-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.mindmap-item-actions {
  display: flex;
  gap: 4px;
}

.mindmap-empty {
  margin: 16px;
  padding: 26px 18px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--text-secondary);
}

.mindmaps-workbench {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.mindmaps-title-input {
  flex: 1 1 220px;
  min-width: 170px;
  font-size: 1rem;
  font-weight: 700;
}

.mindmaps-status {
  display: none;
  min-width: 140px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-align: right;
}

.mindmaps-editor-grid {
  display: grid;
  grid-template-columns: minmax(320px, var(--mindmaps-editor-width, 34%)) 10px minmax(0, 1fr);
  min-height: 0;
}

.mindmaps-editor-pane,
.mindmaps-preview-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.mindmaps-editor-pane {
  border-right: 0;
}

.mindmaps-resize-handle {
  position: relative;
  min-height: 0;
  cursor: col-resize;
  background: rgba(255, 255, 255, 0.04);
}

.mindmaps-resize-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 54px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -50%);
}

.mindmaps-resize-handle:hover::before {
  background: var(--primary-accent);
}

.mindmaps-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 8px;
  background: rgba(12, 12, 15, 0.88);
}

.mindmaps-tab {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.mindmaps-tab.active {
  background: var(--primary-accent);
  color: white;
}

.mindmaps-editor-body {
  position: relative;
  min-height: 0;
  flex: 1;
  display: flex;
}

.mindmaps-editor-host {
  position: absolute;
  inset: 0;
  min-height: 0;
  background: #08090d;
}

.mindmaps-editor-host[hidden],
.mindmaps-textarea[hidden] {
  display: none !important;
}

.mindmaps-textarea {
  width: 100%;
  flex: 1;
  resize: none;
  border: 0;
  border-radius: 0;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  background: #08090d;
  color: #e5edf7;
}

.mindmaps-preview-pane {
  background:
    linear-gradient(135deg, rgba(68, 167, 255, 0.13), transparent 35%),
    linear-gradient(225deg, rgba(32, 199, 168, 0.10), transparent 35%),
    var(--streab-bg-2, #101116);
}

.mindmaps-preview-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background-size: 30px 30px;
  background-image:
    linear-gradient(to right, rgba(130, 145, 170, 0.11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(130, 145, 170, 0.11) 1px, transparent 1px);
}

.mindmaps-preview-canvas.no-grid {
  background-image: none;
}

.mindmaps-sync-toolbar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--streab-border, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  background: var(--streab-elevated, rgba(12, 12, 15, 0.86));
  box-shadow: var(--streab-shadow-soft, 0 18px 45px rgba(0, 0, 0, 0.28));
  backdrop-filter: blur(14px);
}

.mindmaps-panzoom-toolbar {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--streab-border, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  background: var(--streab-elevated, rgba(12, 12, 15, 0.86));
  box-shadow: var(--streab-shadow-soft, 0 18px 45px rgba(0, 0, 0, 0.28));
  backdrop-filter: blur(14px);
}

.mindmaps-toolbar-separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
}

.mindmaps-editor-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 15, 0.88);
}

.mindmaps-editor-footer .mindmaps-button {
  flex: 1;
  font-size: 0.84rem;
  padding: 0 8px;
}

.mindmaps-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(12, 12, 15, 0.9);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.mindmaps-switch input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary-accent);
}

.mindmaps-render-target {
  position: absolute;
  inset: 18px;
  display: block;
  min-width: 0;
  min-height: 0;
}

.mindmaps-render-target svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.mindmaps-error {
  display: none;
  padding: 12px 16px;
  background: rgba(220, 38, 38, 0.15);
  border-top: 1px solid rgba(248, 113, 113, 0.28);
  color: #fecaca;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
}

.mindmaps-error.show {
  display: block;
}

.mindmaps-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
}

.mindmaps-modal-backdrop,
.mindmaps-modal-backdrop * {
  box-sizing: border-box;
  color: var(--streab-text, #f8fafc);
  font-family: var(--streab-font, "Netflix Sans", Inter, Arial, sans-serif);
  letter-spacing: 0;
}

.mindmaps-modal {
  width: min(720px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 18px;
  background: var(--streab-elevated, #17171d);
  border: 1px solid var(--streab-border, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  box-shadow: var(--streab-shadow, none);
}

.mindmaps-modal p,
.mindmaps-modal small,
.mindmaps-modal strong,
.mindmaps-modal input {
  color: var(--streab-text, #f8fafc);
  font-family: var(--streab-font, "Netflix Sans", Inter, Arial, sans-serif);
}

.mindmaps-modal p {
  margin: 0 0 14px;
  color: var(--streab-muted, #c8ced8);
  font-size: 0.98rem;
  line-height: 1.5;
}

.mindmaps-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.mindmaps-modal h3 {
  margin: 0;
  color: var(--streab-text, #f8fafc);
  font-family: var(--streab-font, "Netflix Sans", Inter, Arial, sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
}

.mindmaps-version-row,
.mindmaps-folder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mindmaps-fullscreen-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(135deg, rgba(68, 167, 255, 0.15), transparent 32%),
    linear-gradient(225deg, rgba(32, 199, 168, 0.12), transparent 32%),
    var(--streab-bg, #08090d);
}

.mindmaps-fullscreen-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--streab-elevated, rgba(12, 12, 15, 0.92));
  backdrop-filter: blur(14px);
}

.mindmaps-fullscreen-title {
  min-width: 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mindmaps-fullscreen-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mindmaps-fullscreen-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background-size: 30px 30px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.12) 1.5px, transparent 1.5px);
}

.mindmaps-fullscreen-target {
  position: absolute;
  inset: 24px;
}

.mindmaps-fullscreen-target svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

@media (max-width: 1180px) {
  .mindmaps-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .mindmaps-library {
    max-height: 360px;
  }

  .mindmaps-editor-grid {
    grid-template-columns: 1fr;
  }

  .mindmaps-resize-handle {
    display: none;
  }

  .mindmaps-editor-pane {
    min-height: 360px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mindmaps-preview-pane {
    min-height: 440px;
  }
}

@media (max-width: 640px) {
  .mindmaps-shell {
    min-height: 0;
    gap: 12px;
  }

  .mindmaps-library-header,
  .mindmaps-editor-header,
  .mindmaps-preview-header {
    align-items: stretch;
    flex-direction: column;
  }

  .mindmaps-toolbar,
  .mindmaps-preview-tools {
    width: 100%;
  }

  .mindmaps-button,
  .mindmaps-select {
    flex: 1 1 auto;
  }

  .mindmaps-sync-toolbar,
  .mindmaps-panzoom-toolbar {
    position: static;
    margin: 10px;
    max-width: none;
    justify-content: flex-start;
  }

  .mindmaps-preview-canvas {
    display: flex;
    flex-direction: column;
  }

  .mindmaps-render-target {
    position: relative;
    inset: auto;
    flex: 1;
    min-height: 420px;
  }
}

.mindmaps-empty {
  margin: 14px;
  padding: 16px;
  color: var(--text-secondary);
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.mindmaps-muted {
  color: #a7adbd !important;
}

.mindmaps-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.mindmaps-share-grid label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  color: #f8fafc;
  font-size: 0.86rem;
  font-weight: 800;
}

.mindmaps-share-textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  outline: none;
  background: rgba(5, 7, 11, 0.92);
  color: #dbeafe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .mindmaps-share-grid {
    grid-template-columns: 1fr;
  }
}

/* Light-mode and overflow refinements for the STREAB panel shell. */
.streab-mindmaps-section,
.streab-mindmaps-section * {
  box-sizing: border-box;
}

.streab-mindmaps-section {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.mindmaps-shell,
.mindmaps-workbench,
.mindmaps-editor-grid,
.mindmaps-preview-pane,
.mindmaps-preview-canvas {
  min-width: 0;
  max-width: 100%;
}

.mindmaps-toolbar {
  justify-content: flex-end;
}

.mindmaps-title-input {
  min-width: min(220px, 100%);
}

.mindmaps-select {
  max-width: 100%;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-library-header,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-editor-header,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-header,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-editor-footer {
  border-color: rgba(15, 23, 42, 0.09);
  background: rgba(255, 255, 255, 0.82);
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-editor-footer,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-tabs,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-switch,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-sync-toolbar,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-panzoom-toolbar {
  background: rgba(248, 250, 252, 0.92);
  border-color: rgba(15, 23, 42, 0.11);
  color: #111827;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-tab {
  color: #526173;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-tab.active {
  color: #ffffff;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-pane,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-canvas,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-fullscreen-stage {
  background-color: #f4f8fd;
  background-image:
    linear-gradient(to right, rgba(37, 99, 235, 0.085) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 99, 235, 0.07) 1px, transparent 1px);
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-canvas.no-grid {
  background-image: none;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-textarea,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-editor-host {
  background: #f8fafc;
  color: #111827;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmap-item {
  border-color: rgba(15, 23, 42, 0.09);
  background: rgba(248, 250, 252, 0.88);
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmap-item:hover,
#streab-nuvem-scope[data-streab-theme="light"] .mindmap-item.active {
  background: rgba(37, 99, 235, 0.1);
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-item {
  border-color: rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  color: #111827;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-item:hover {
  border-color: rgba(37, 99, 235, 0.35);
  background: #eff6ff;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-item.active {
  border-color: rgba(37, 99, 235, 0.56);
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-title {
  color: #111827;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-muted,
#streab-nuvem-scope[data-streab-theme="light"] .mindmap-item-meta,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-meta,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-empty {
  color: #5f6d82 !important;
}

@media (max-width: 1180px) {
  .mindmaps-shell {
    height: auto;
    min-height: 0;
  }
}

/* Desktop fit and polished library list ----------------------------- */
.streab-mindmaps-section {
  height: 100%;
  min-height: 0;
}

.mindmaps-shell {
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
}

.mindmaps-library,
.mindmaps-workbench,
.mindmaps-editor-grid,
.mindmaps-editor-pane,
.mindmaps-preview-pane,
.mindmaps-preview-canvas {
  min-height: 0;
}

.mindmaps-library {
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.mindmaps-list {
  gap: 10px;
  padding: 10px 12px 16px;
}

.mindmaps-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  width: 100%;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  box-shadow: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.mindmaps-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(78, 167, 255, 0.4);
  background: rgba(78, 167, 255, 0.12);
}

.mindmaps-list-item.active {
  border-color: rgba(78, 167, 255, 0.64);
  background: linear-gradient(135deg, rgba(78, 167, 255, 0.18), rgba(117, 104, 246, 0.12));
}

.mindmaps-list-title {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mindmaps-list-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.73rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mindmaps-list-meta .fa-star {
  color: #d99100;
}

.mindmaps-workbench {
  grid-template-rows: auto minmax(0, 1fr);
}

.mindmaps-editor-header {
  flex-shrink: 0;
}

.mindmaps-toolbar {
  flex-wrap: wrap;
  gap: 7px;
}

.mindmaps-toolbar .mindmaps-select {
  width: auto;
  min-width: 112px;
  max-width: 136px;
}

.mindmaps-toolbar .mindmaps-switch {
  min-width: 64px;
  padding-inline: 9px;
}

.mindmaps-toolbar .mindmaps-button.primary {
  min-width: 92px;
}

.mindmaps-editor-grid {
  grid-template-columns: minmax(330px, 31%) 8px minmax(0, 1fr);
  overflow: hidden;
}

.mindmaps-editor-pane,
.mindmaps-preview-pane {
  overflow: hidden;
}

.mindmaps-editor-pane .mindmaps-editor-header {
  padding: 12px 14px;
}

.mindmaps-editor-body {
  min-height: 0;
}

.mindmaps-editor-footer {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 7px;
  padding: 10px 12px;
  overflow: hidden;
}

.mindmaps-editor-footer .mindmaps-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 0 8px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mindmaps-sync-toolbar,
.mindmaps-panzoom-toolbar {
  max-width: calc(100% - 28px);
}

.mindmaps-preview-canvas {
  min-height: 0;
}

.mindmaps-render-target {
  inset: 14px;
}

@media (min-width: 1181px) and (max-width: 1780px) {
  .mindmaps-shell {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 12px;
  }

  .mindmaps-editor-grid {
    grid-template-columns: minmax(300px, 34%) 8px minmax(0, 1fr);
  }

  .mindmaps-library-header,
  .mindmaps-editor-header {
    padding: 12px 14px;
  }

  .mindmaps-button,
  .mindmaps-icon-button {
    min-height: 36px;
  }

  .mindmaps-icon-button {
    width: 36px;
  }
}

@media (max-height: 820px) and (min-width: 1181px) {
  .mindmaps-library-header,
  .mindmaps-editor-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .mindmaps-search {
    padding: 10px 12px;
  }

  .mindmaps-list {
    padding-bottom: 12px;
  }

  .mindmaps-preview-pane {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .mindmaps-editor-header,
  .mindmaps-toolbar,
  .mindmaps-editor-footer {
    align-items: stretch;
  }

  .mindmaps-toolbar,
  .mindmaps-editor-footer {
    width: 100%;
  }

  .mindmaps-button,
  .mindmaps-icon-button,
  .mindmaps-select,
  .mindmaps-switch {
    flex: 1 1 auto;
  }
}

/* Final light-theme repair after modular layout overrides. */
#streab-nuvem-scope[data-streab-theme="light"] #mindmaps-section,
#streab-nuvem-scope[data-streab-theme="light"] #mindmaps-section * {
  color-scheme: light !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-library,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-workbench,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-panel,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-card {
  border-color: rgba(15, 23, 42, 0.12) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: #111827 !important;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08) !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-library {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94)) !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-library-header,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-editor-header,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-header,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-editor-footer {
  border-color: rgba(15, 23, 42, 0.1) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #111827 !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-library-title,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-title,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-button,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-icon-button,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-select,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-input,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-switch,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-tab {
  color: #111827 !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-meta,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-tab:not(.active) {
  color: #64748b !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-input,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-select,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-button,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-icon-button,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-switch,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-tab,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-sync-toolbar,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-panzoom-toolbar {
  border-color: rgba(15, 23, 42, 0.12) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-tabs {
  border-color: rgba(15, 23, 42, 0.08) !important;
  background: rgba(248, 250, 252, 0.92) !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-tab.active,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-button.primary {
  border-color: transparent !important;
  background: linear-gradient(135deg, #2f7df6, #35c2d8) !important;
  color: #ffffff !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-icon-button.is-active,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-switch.is-active {
  border-color: rgba(47, 125, 246, 0.28) !important;
  background: rgba(47, 125, 246, 0.1) !important;
  color: #0f172a !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-editor-host,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-textarea {
  border-color: rgba(15, 23, 42, 0.1) !important;
  background: #ffffff !important;
  color: #111827 !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list {
  background: transparent !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-item {
  border-color: rgba(15, 23, 42, 0.1) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: #111827 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-item:hover {
  border-color: rgba(47, 125, 246, 0.3) !important;
  background: #ffffff !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-list-item.active {
  border-color: rgba(47, 125, 246, 0.58) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94)) !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-pane,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-canvas {
  background-color: #f4f8fd !important;
  color: #111827 !important;
}

#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-canvas .node rect,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-canvas .node circle,
#streab-nuvem-scope[data-streab-theme="light"] .mindmaps-preview-canvas .node ellipse {
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.08));
}

#streab-nuvem-scope[data-streab-theme="dark"] .mindmaps-list-item {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  color: var(--text-primary) !important;
}
