.folder-catalog { margin-block: var(--space-4); }
.folder-catalog > label { display: block; margin-top: var(--space-3); }
.folder-catalog input { width: 100%; }
.folder-plant { padding: var(--space-3); margin-block: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-surface); overflow-wrap: anywhere; }
.folder-plant label { display: grid; gap: var(--space-2); }
.folder-plant select { width: 100%; min-width: 0; }
.folder-plant button { margin-top: var(--space-3); width: 100%; }
.folder-pages { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }

.folder-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.folder-values { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
@media (max-width: 600px) { .folder-compare { grid-template-columns: 1fr; } }

.folder-actions { display: grid; gap: var(--space-2); }
.export-actions > .folder-actions { min-width: 0; flex-basis: 100%; overflow-wrap: anywhere; }
.folder-actions[hidden] { display: none; }
.folder-disconnect { display: flex; justify-content: center; align-items: center; gap: var(--space-2); }
.folder-warning-icon { color: #f5c451; flex: 0 0 20px; width: 20px; height: 20px; }

/* Same compact checkbox size as the existing plant options; label stays touchable. */
.folder-merge-cleanup { display: flex; flex-direction: row; align-items: center; gap: var(--space-3); min-height: var(--control-height); margin-block: var(--space-3); cursor: pointer; }
.folder-merge-cleanup input[type="checkbox"] { width: 1.25rem; height: 1.25rem; min-height: 1.25rem; flex: 0 0 1.25rem; padding: 0; margin: 0; accent-color: var(--color-accent); }

/* Folder help belongs to its own row, never between shrinking export buttons. */
@media (min-width: 1280px) {
  #workspace #desktopExportsSlot .export-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: var(--space-2);
  }
  #desktopExportsSlot .folder-actions { grid-column: 1 / -1; grid-row: 2; }
  #workspace #desktopExportsSlot button { width: 100%; min-width: 0; }
}

/* Keep the profile title and actions aligned with the existing work surface. */
:is(#gasProfile, #sprinklerProfile) > .workspace-title {
  grid-template-columns: minmax(0, 1fr);
  max-width: 58rem;
  margin-inline: auto;
}
:is(#gasProfile, #sprinklerProfile) .export-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  align-items: stretch;
}
:is(#gasProfile, #sprinklerProfile) .export-actions > .folder-actions {
  grid-column: 1 / -1;
  grid-row: 2;
}
:is(#gasProfile, #sprinklerProfile) .export-actions button { width: 100%; }
@media (max-width: 760px) {
  :is(#gasProfile, #sprinklerProfile) .export-actions { grid-template-columns: minmax(0, 1fr); }
  :is(#gasProfile, #sprinklerProfile) .export-actions > .folder-actions { grid-row: auto; }
}
