.quick-connect,
.toolbar-button,
.approve-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 11px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.quick-connect-anchor {
  position: relative;
  margin-bottom: 7px;
}

.connection-sidebar-subheader {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  margin: 0 0 5px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.connection-search-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.connection-search-row .search-box {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.connection-search-clear {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.connection-search-clear:hover,
.connection-search-clear:focus-visible {
  color: var(--text);
  background: var(--surface-muted);
}

.connection-search-row .quick-connect-anchor {
  flex: 0 0 auto;
  margin: 0;
}

.connection-search-row .quick-connect-icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
}

.tab-quick-connect-anchor {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.quick-connect {
  --button-shadow-color: var(--accent);
  width: 100%;
  color: #ffffff;
  background: var(--accent);
  box-shadow: var(--button-shadow);
}

[data-color-scheme="blue-green-white"] .quick-connect {
  --button-shadow-color: var(--green);
  color: #ffffff;
  background: var(--green);
}

.add-connection-menu {
  position: absolute;
  top: 44px;
  right: 0;
  z-index: 82;
  display: grid;
  width: 170px;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.add-connection-menu button {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 34px;
  min-width: 0;
  width: 100%;
  padding: 7px 10px;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.add-connection-menu button:hover:not(:disabled) {
  background: var(--surface-muted);
}

.add-connection-menu button:disabled {
  color: var(--text-faint);
  cursor: default;
}

.add-connection-menu .connection-main {
  flex: 1 1 auto;
}

.add-connection-menu button {
  min-height: 30px;
  padding: 6px 10px;
}

.add-connection-menu .menu-item-icon {
  flex: 0 0 auto;
  color: var(--text-muted);
}

.add-connection-menu button:hover:not(:disabled) .menu-item-icon {
  color: var(--text);
}

.add-connection-menu-separator {
  height: 1px;
  background: var(--border);
}

.tree-folder-controls {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  margin: 0;
}

.tree-folder-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

.tree-folder-control:hover,
.tree-folder-control:focus-visible {
  color: var(--text);
  background: var(--surface-muted);
  border-color: var(--border);
  outline: 0;
}

.tree-folder-control:disabled {
  color: var(--text-faint);
  cursor: default;
}

.tree-folder-control:disabled:hover {
  background: transparent;
  border-color: transparent;
}

.tree-folder-control.active,
.tree-folder-control[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.tree-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  border-radius: 6px;
  -webkit-user-select: none;
  user-select: none;
}

.tree-group {
  padding-left: var(--tree-level-indent, 0);
  margin-bottom: 6px;
}

.pending-folder-group {
  margin-bottom: 4px;
}

.tree-folder-row,
.tree-folder,
.connection-row,
.connection-open {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border-radius: 6px;
}

.tree-folder-row {
  gap: 4px;
}

.tree-folder-row.can-drag,
.tree-folder-row.can-drag .tree-folder,
.connection-row.can-drag,
.connection-row.can-drag .connection-open {
  cursor: default;
}

.tree-folder-row.can-drag:active,
.tree-folder-row.can-drag:active .tree-folder,
.connection-row.can-drag:active,
.connection-row.can-drag:active .connection-open {
  cursor: default;
}

.tree-list.drop-target,
.tree-list.external-drop-target,
.tree-folder-row.drop-target,
.connection-row.drop-target,
.tree-root-drop-target.drop-target {
  background: var(--accent-soft);
  outline: 1px solid #8db5ff;
  outline-offset: -1px;
}

.tree-root-drop-target {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.tree-root-drop-target.drop-target {
  color: var(--accent);
  border-color: #8db5ff;
}

.tree-folder-row.dragging-source,
.connection-row.dragging-source {
  opacity: 0.32;
}

.tree-drag-preview {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 7px 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #8db5ff;
  border-radius: 6px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
  transform: rotate(-1deg);
}

.tree-drag-preview.folder {
  min-height: 32px;
  font-size: 12px;
  font-weight: 800;
}

.tree-drag-count {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 12px;
}

/* Visual Studio–style docking overlay while dragging a Connection onto the
   Workspace Canvas. The outline frames the hovered pane; the highlight previews
   the snap region and glides between edges/panes via transitioned geometry. */
.dock-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

.dock-overlay-outline,
.dock-overlay-highlight {
  position: fixed;
  border-radius: 8px;
  transition: left 120ms ease, top 120ms ease, width 120ms ease, height 120ms ease,
    opacity 120ms ease;
}

.dock-overlay-outline {
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.dock-overlay-highlight {
  border: 1.5px solid color-mix(in srgb, var(--accent) 80%, transparent);
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent),
    0 8px 24px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: dock-overlay-pop 140ms ease;
}

@keyframes dock-overlay-pop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock-overlay-outline,
  .dock-overlay-highlight {
    transition: none;
  }

  .dock-overlay-highlight {
    animation: none;
  }
}

.row-action {
  cursor: pointer;
}

.tree-folder,
.connection-open {
  cursor: default;
}

.tree-folder {
  flex: 1 1 auto;
  gap: 5px;
  height: 24px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 800;
}

.tree-disclosure {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: -6px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.tree-disclosure:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.tree-folder small {
  margin-left: auto;
  color: var(--text-faint);
}

.pending-folder-row {
  background: var(--surface);
}

.pending-folder {
  cursor: text;
}

.pending-folder-input,
.tree-rename-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 22px;
  padding: 0 5px;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  background: transparent;
  border: 1px solid #8db5ff;
  border-radius: 4px;
  outline: none;
}

.pending-folder-input::placeholder,
.tree-rename-input::placeholder {
  color: var(--text-faint);
}

.tree-rename-input {
  width: 100%;
}

.tree-folder-connections {
  padding-left: 16px;
}

.connection-row {
  gap: 5px;
  min-height: 28px;
  /* Vertical padding lives at 0 so the stretched .connection-open button covers
     the full row height (border-box keeps the row at its min-height; content
     stays centered). Horizontal padding is retained for inset. */
  padding: 0 4px;
}

.connection-row:hover,
.connection-child-tab-row:hover {
  background: var(--surface);
}

.connection-open,
.connection-child-tab-open {
  flex: 1 1 auto;
  /* Stretch the select/open target to the full row height. Without this the
     button is only as tall as its icon, leaving dead strips at the top and
     bottom of each row where clicks land on the row div (drag handler only)
     instead of selecting. Content stays centered via align-items on the row. */
  align-self: stretch;
  gap: 6px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.connection-child-tab-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  margin-left: 24px;
  /* Zero vertical padding so the stretched open button fills the row height. */
  padding: 0 4px 0 10px;
  color: var(--text);
  background: transparent;
  border-left: 1px solid var(--border);
  border-radius: 6px;
}

.connection-child-tab-row.active {
  background: var(--accent-soft);
}

.connection-row.active,
.connection-row.selected {
  background: var(--accent-soft);
}

.connection-child-tab-open {
  display: flex;
  align-items: center;
  color: inherit;
  background: transparent;
}

.connection-child-tab-row .connection-main strong {
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
}

.connection-child-tab-row .tree-rename-input {
  height: 20px;
  padding: 0 4px;
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
}

.connection-child-tab-row .connection-main small {
  font-size: 11px;
}

.connection-child-tab-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  background: transparent;
  border-radius: 5px;
}

.connection-child-tab-close:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.connection-open > .i-icon,
.connection-open > .connection-icon-shell,
.connection-child-tab-open > .i-icon,
.connection-child-tab-open > .connection-icon-shell,
.tree-drag-preview .connection-icon-shell,
.tree-drag-preview .i-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.connection-icon-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--connection-icon-shell-size);
  height: var(--connection-icon-shell-size);
  color: var(--connection-icon-fg);
  background: var(--connection-icon-bg);
  border-radius: 6px;
  vertical-align: middle;
}

.connection-icon-shell.has-background {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.38), 0 1px 2px rgb(15 23 42 / 0.16);
}

.connection-icon-image {
  display: inline-block;
  width: var(--connection-icon-size);
  height: var(--connection-icon-size);
  object-fit: contain;
  vertical-align: middle;
}

.connection-main {
  display: grid;
  min-width: 0;
  text-align: left;
}

.connection-main strong,
.connection-main small,
.tab span,
.file-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-main strong {
  font-size: 13px;
  line-height: 1.3;
}

.connection-row .connection-main strong {
  font-size: 12px;
  line-height: 1.2;
}

.connection-main small,
.workspace-toolbar span,
.file-pane header span,
.transfer-queue span,
.approval-card p,
.status-bar,
.settings-stack strong {
  color: var(--text-muted);
  font-size: 13px;
}

.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.status-dot.connected {
  background: var(--green);
}

.status-dot.idle {
  background: var(--amber);
}

.status-dot.offline {
  background: var(--border-strong);
}

.status-sync-input {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--green);
  animation: status-sync-input-pulse 1.4s ease-in-out infinite;
}

@keyframes status-sync-input-pulse {
  0%, 100% {
    opacity: 0.55;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-sync-input {
    animation: none;
  }
}

.folder-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  opacity: 0;
}

.tree-folder-row:hover .folder-actions,
.tree-folder-row:focus-within .folder-actions {
  opacity: 1;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--text-faint);
  background: transparent;
  border-radius: 5px;
}

.row-action:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.row-action.danger:hover {
  color: var(--red);
}


.connection-dialog header,
.settings-dialog header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 4px;
}

.connection-dialog-header.compact {
  justify-content: flex-start;
}

.connection-dialog-backdrop .child-connection-properties-dialog {
  overflow: visible;
}

.connection-dialog-backdrop .connection-dialog:has(.connection-icon-popover) {
  overflow: visible;
}

.connection-dialog-header {
  position: relative;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.connection-dialog-header:has(.connection-dialog-close),
.connection-dialog-header:has(.mcp-dialog-close-button) {
  padding-right: 44px;
}

.connection-dialog-header .connection-dialog-close,
.connection-dialog-header .mcp-dialog-close-button {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}

.connection-dialog-header .connection-dialog-close,
.connection-dialog-header .mcp-dialog-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--text-muted);
  background: var(--surface-muted);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.connection-dialog-header .connection-dialog-close:hover,
.connection-dialog-header .connection-dialog-close:focus-visible,
.connection-dialog-header .mcp-dialog-close-button:hover,
.connection-dialog-header .mcp-dialog-close-button:focus-visible {
  color: var(--text);
  background: var(--border);
  outline: none;
}

.connection-dialog-header .connection-dialog-eyebrow {
  margin: 0 0 3px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.connection-dialog-header .connection-dialog-title {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.018em;
  line-height: 1.2;
}

.connection-dialog-header.compact .panel-label {
  margin-bottom: 0;
}

.connection-type-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 13px 14px;
  background: var(--surface-muted);
  border: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 0.5px var(--border);
}

.connection-type-summary > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.connection-type-summary > span strong,
.connection-type-summary > span small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-type-summary > span strong {
  font-size: 15px;
  font-weight: 640;
  letter-spacing: -0.01em;
}

.connection-type-summary > span small {
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.connection-icon-editor {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.connection-icon-edit-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.connection-icon-edit-button:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.connection-icon-edit-button .connection-icon-shell {
  max-width: 38px;
  max-height: 38px;
}

/* In the connection dialog the identity tile is a rounded-rectangle app-icon
   squircle (colored backing, not a circle), with no surrounding chrome. */
.connection-type-summary .connection-icon-edit-button {
  width: 52px;
  height: 52px;
  background: transparent;
  border: 0;
  border-radius: 10px;
}

.connection-type-summary .connection-icon-edit-button:hover {
  border-color: transparent;
}

.connection-type-summary .connection-icon-edit-button .connection-icon-shell {
  max-width: 52px;
  max-height: 52px;
  border-radius: 10px;
}

.connection-type-summary .connection-icon-edit-button .connection-icon-image {
  border-radius: 8px;
}

.connection-icon-edit-button .connection-icon-image {
  border-radius: 5px;
}

.connection-icon-edit-glyph {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.18);
}

.connection-icon-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: grid;
  width: min(520px, calc(100vw - 48px));
  max-height: min(430px, calc(100vh - 140px));
  overflow-y: auto;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.icon-library-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.icon-library-search {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 28px;
  margin: 0;
}

/* The icon search lives inside a slim `.search-box` row and is shared across
   dialogs (connections, workspace, dashboard). Reset the input globally so
   container input styling (height/padding/border/background) can never make the
   typed text spill out of the row — this fix must not be scoped to one dialog. */
.icon-library-search input[type="search"] {
  height: auto;
  min-height: 0;
  padding: 0;
  line-height: normal;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.connection-icon-grid.icon-library-grid {
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  max-height: 260px;
  overflow-y: auto;
  padding: 2px;
  justify-items: stretch;
}

.connection-icon-grid.icon-library-grid .connection-icon-choice {
  width: 100%;
  height: auto;
  min-height: 34px;
  aspect-ratio: 1;
}

.icon-library-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

/* Inline color palette (design language): an expanded row of round swatches,
   the selected one ringed in the accent. Lives on the right of the identity tile. */
.connection-swatches {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
}

.connection-icon-palettes {
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  min-width: 0;
}

.connection-swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  cursor: pointer;
  background: var(--connection-swatch);
  border: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
  transition: transform 0.1s ease;
}

.connection-swatch:hover {
  transform: scale(1.12);
}

.connection-swatch.selected {
  box-shadow: 0 0 0 2px var(--surface-muted), 0 0 0 4px var(--accent);
}

.connection-swatch.none {
  position: relative;
  background: var(--surface);
}

.connection-swatch.none::after {
  position: absolute;
  inset: 5px;
  content: "";
  border: 1.5px dashed var(--text-faint);
  border-radius: 50%;
}

.connection-icon-picker-section {
  display: grid;
  gap: 6px;
}

.connection-icon-picker-section p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

/* The foreground swatches live inside the icon selector popover and only show
   for foreground-capable line glyphs; set them off from the icon grid above. */
.connection-icon-foreground-section {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* The custom foreground color picker sits near the bottom of the scrollable icon
   selector. Open its palette upward so the picker remains usable instead of
   being clipped by the popover's lower edge. */
.connection-icon-foreground-section .color-palette-popover {
  top: auto;
  bottom: calc(100% + 8px);
}

.connection-icon-current {
  position: relative;
  width: 30px;
  height: 30px;
}

.connection-icon-remove-button {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  color: var(--text);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.2);
}

.connection-icon-remove-button:hover {
  color: var(--red);
  border-color: var(--red);
}

.connection-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 30px);
  gap: 6px;
}

.connection-icon-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.connection-icon-choice:hover,
.connection-icon-choice[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.connection-icon-choice img,
.connection-icon-choice .connection-icon-shell,
.connection-icon-choice .workspace-icon-shell,
.connection-icon-choice .connection-icon-image,
.connection-icon-choice .connection-icon-lucide-preview,
.connection-icon-choice svg {
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  border-radius: 4px;
}

.connection-icon-choice .connection-icon-lucide-preview {
  color: var(--text);
}

.connection-icon-picker-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.connection-icon-picker-actions .toolbar-button {
  flex: 1 1 0;
  min-width: 0;
}

.connection-icon-file-input {
  display: none;
}

.connection-dialog-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 2px;
  animation: fields-in 170ms ease-out;
}

.connection-dialog-fields-two-column {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  column-gap: 10px;
  align-items: start;
}

.connection-dialog-primary-fields {
  display: contents;
}

.connection-dialog-fields-two-column > .connection-dialog-primary-fields {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  grid-column: 1;
}

.connection-dialog-fields-two-column > .connection-specific-options {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}

.connection-session-fields,
.connection-option-fields {
  display: grid;
  min-width: 0;
  padding: 10px;
  background: var(--surface-muted);
  border-radius: 10px;
  box-shadow: inset 0 0 0 0.5px var(--border);
}

/* Endpoint and auth groups sit directly on the white sheet — no grey card,
   no dividers. Only the identity tile and toggle/option panels stay grey. */
.connection-endpoint-fields,
.connection-auth-fields {
  display: grid;
  min-width: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.connection-endpoint-fields {
  grid-template-columns: minmax(0, 1fr) 104px;
  column-gap: 9px;
  row-gap: 9px;
}

.connection-auth-fields {
  row-gap: 9px;
}

.connection-endpoint-fields .endpoint-host-input {
  grid-column: 1;
}

.connection-endpoint-fields .endpoint-port-input {
  grid-column: 2;
}

.connection-endpoint-fields .endpoint-wide-input {
  grid-column: 1 / -1;
}

.connection-endpoint-fields .proxy-jump-input {
  grid-column: 1 / -1;
}

.connection-auth-fields .auth-mode-row {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.connection-auth-fields .auth-method-selector {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  padding: 4px;
  background: var(--surface-muted);
  border-radius: 10px;
  box-shadow: inset 0 0 0 0.5px var(--border);
  isolation: isolate;
}

.connection-auth-fields .auth-method-selector::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16), 0 0 0 0.5px var(--border);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.connection-auth-fields .auth-method-selector[data-auth-method="keyFile"]::before {
  transform: translateX(0);
}

.connection-auth-fields .auth-method-selector[data-auth-method="password"]::before {
  transform: translateX(100%);
}

.connection-auth-fields .auth-method-selector[data-auth-method="agent"]::before {
  transform: translateX(200%);
}

.connection-auth-fields .auth-method-selector button {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.14s;
}

.connection-auth-fields .auth-method-selector button:hover {
  color: var(--text);
}

.connection-auth-fields .auth-method-selector button:focus-visible {
  outline: 0;
  box-shadow: var(--ring);
}

.connection-auth-fields .auth-method-selector button.active {
  color: var(--text);
}

.connection-auth-fields .auth-method-selector svg {
  flex: 0 0 auto;
  color: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .connection-auth-fields .auth-method-selector::before {
    transition: none;
  }
}

.connection-option-fields .option-mode-row.local-shell-mode-row {
  grid-template-columns: auto minmax(0, 1fr);
  row-gap: 8px;
}

.connection-option-fields .local-shell-selector {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(var(--shell-option-columns, 1), minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  min-width: 0;
  padding: 4px;
  background: var(--surface-muted);
  border-radius: 10px;
  box-shadow: inset 0 0 0 0.5px var(--border);
  isolation: isolate;
}

.connection-option-fields .local-shell-selector::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--shell-option-columns, 1));
  height: calc((100% - 8px) / var(--shell-option-rows, 1));
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16), 0 0 0 0.5px var(--border);
  transform: translate(
    calc(var(--shell-option-column, 0) * 100%),
    calc(var(--shell-option-row, 0) * 100%)
  );
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.connection-option-fields .local-shell-selector button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.14s;
}

.connection-option-fields .local-shell-selector button:hover {
  color: var(--text);
}

.connection-option-fields .local-shell-selector button:focus-visible {
  outline: 0;
  box-shadow: var(--ring);
}

.connection-option-fields .local-shell-selector button.active {
  color: var(--text);
}

.connection-option-fields .local-shell-selector svg {
  flex: 0 0 auto;
  color: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .connection-option-fields .local-shell-selector::before {
    transition: none;
  }
}

.connection-option-fields > label,
.connection-option-fields > .option-mode-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.connection-option-fields > label:first-child,
.connection-option-fields > .option-mode-row:first-child {
  padding-top: 0;
}

.connection-option-fields > label:last-child,
.connection-option-fields > .option-mode-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.connection-option-fields {
  gap: 0;
}

.connection-option-fields .option-mode-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 224px);
  column-gap: 9px;
  row-gap: 4px;
  align-items: center;
}

.connection-option-fields .option-mode-row > select {
  grid-column: 2;
}

.connection-option-fields .ftp-protocol-row {
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr) minmax(220px, 250px);
  column-gap: 13px;
  align-items: center;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
}

.connection-option-fields .ftp-protocol-row > .ftp-protocol-selector {
  grid-column: 3;
}

.connection-option-fields .ftp-protocol-selector {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  padding: 3px;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: inset 0 0 0 0.5px var(--border);
  isolation: isolate;
}

.connection-option-fields .ftp-protocol-selector::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  background: var(--surface-muted);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14), 0 0 0 0.5px var(--border);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.connection-option-fields .ftp-protocol-selector[data-ftp-protocol="sftp"]::before {
  transform: translateX(0);
}

.connection-option-fields .ftp-protocol-selector[data-ftp-protocol="ftps"]::before {
  transform: translateX(100%);
}

.connection-option-fields .ftp-protocol-selector[data-ftp-protocol="ftp"]::before {
  transform: translateX(200%);
}

.connection-option-fields .ftp-protocol-selector button {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 26px;
  padding: 0 4px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: color 0.14s;
}

.connection-option-fields .ftp-protocol-selector button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-option-fields .ftp-protocol-selector button:hover,
.connection-option-fields .ftp-protocol-selector button.active {
  color: var(--text);
}

.connection-option-fields .ftp-protocol-selector button:focus-visible {
  outline: 0;
  box-shadow: var(--ring);
}

@media (prefers-reduced-motion: reduce) {
  .connection-option-fields .ftp-protocol-selector::before {
    transition: none;
  }
}

.connection-session-fields {
  padding: 0 10px;
}

fieldset.connection-session-fields {
  padding-top: 8px;
}

fieldset.connection-session-fields > legend {
  padding: 0 2px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

fieldset.connection-specific-options {
  gap: 5px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
}

fieldset.connection-specific-options > legend {
  min-height: 18px;
  margin-bottom: 2px;
}

.connection-specific-options-panel {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 10px;
  background: var(--surface-muted);
  border-radius: 10px;
  box-shadow: inset 0 0 0 0.5px var(--border);
}

.connection-specific-options-panel > .connection-session-toggle:first-child {
  min-height: 30px;
  padding-bottom: 8px;
}

.connection-specific-options-panel > .connection-option-fields {
  padding: 8px 0;
  background: transparent;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  box-shadow: none;
}

.connection-specific-options-panel > .connection-session-fields {
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.connection-session-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 14px;
  align-items: center;
  min-height: 42px;
  padding: 0;
}

.connection-session-toggle span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.connection-dialog .connection-session-toggle input[type="checkbox"] {
  position: relative;
  width: 38px;
  min-width: 38px;
  height: 22px;
  padding: 0;
  appearance: none;
  background: var(--toggle-off-bg, var(--border-strong));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease;
}

.connection-dialog .connection-session-toggle input[type="checkbox"]::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  content: "";
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.24);
  transition: transform 120ms ease;
}

.connection-dialog .connection-session-toggle input[type="checkbox"]:checked {
  background: var(--green);
}

.connection-dialog .connection-session-toggle input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}

/* Popup-style select: blue rounded chevron box on the right (design language). */
.connection-dialog select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Crect width='20' height='20' rx='5' fill='%230a84ff'/%3E%3Cpath d='M7 9l3-3 3 3M7 11l3 3 3-3' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 20px 20px;
}
.connection-dialog select:disabled {
  opacity: 0.55;
}

/* Serial "Line" combobox: an editable input plus a blue chevron button that
   opens a popover of OS-detected ports. A native <datalist> is used elsewhere,
   but it renders no dropdown affordance in WKWebView (macOS), so the serial
   field — which targets macOS /dev/cu.* devices — needs an explicit control. */
.serial-line-combobox {
  position: relative;
  min-width: 0;
}

.serial-line-combobox > input {
  padding-right: 38px;
}

.serial-line-combobox-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: #ffffff;
  background: var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transform: translateY(-50%);
}

.serial-line-combobox-toggle svg {
  transition: transform 120ms ease;
}

.serial-line-combobox.open .serial-line-combobox-toggle svg {
  transform: rotate(180deg);
}

.serial-line-combobox-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  width: 100%;
  max-height: 196px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  list-style: none;
  background: var(--surface);
  border: 0.5px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.18);
}

.serial-line-combobox-list > li {
  min-width: 0;
}

.serial-line-combobox-list > li > button {
  width: 100%;
  height: 28px;
  padding: 0 8px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.serial-line-combobox-list > li > button:hover,
.serial-line-combobox-list > li > button.selected {
  background: var(--surface-muted);
}

.serial-line-combobox-list > li > button.selected {
  font-weight: 700;
}

.serial-line-combobox-empty {
  padding: 6px 8px;
  color: var(--text-faint);
  font-size: 12px;
}

.ssh-startup-script-section {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  margin-top: 1px;
  border-top: 1px solid var(--hairline);
}

.ssh-startup-script-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ssh-startup-script-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.ssh-startup-script-edit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ssh-startup-script-edit:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.local-startup-script-field {
  display: grid;
  gap: 6px;
}

.local-environment-label-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.local-environment-label-row > label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.local-cli-account-trigger {
  flex: 0 0 auto;
}

.local-cli-account-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.local-environment-unsupported {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.connection-environment-guidance {
  max-width: none;
  margin: -2px 0 0;
}

.connection-cli-account-fields {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(190px, 1.2fr);
  gap: 12px;
}

.connection-cli-tool-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.connection-cli-tool-option {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
}

.connection-cli-tool-option:hover {
  background: var(--hover);
}

.connection-cli-tool-option[data-selected="true"] {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent);
}

.connection-cli-tool-option img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 4px;
}

.connection-cli-account-path {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.connection-cli-account-path > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.connection-cli-account-path code {
  min-width: 0;
  padding: 8px 10px;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

@media (max-width: 720px) {
  .connection-cli-account-fields {
    grid-template-columns: 1fr;
  }
}

/* Primary action is accent-blue (matches the design language), not green. */
.connection-dialog .dialog-actions .approve-button {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 35%, transparent);
}
.connection-dialog .dialog-actions .approve-button:hover:not(:disabled) {
  background: var(--accent-press);
}
.connection-dialog .dialog-actions .approve-button.danger {
  background: var(--red);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--red) 30%, transparent);
}

/* Per-row option glyph (design language): a leading monochrome icon that turns
   each grouped option into a Finder-style row — icon · label · control. */
.connection-dialog .option-glyph {
  flex: 0 0 auto;
  color: var(--text-muted);
}

/* Toggle rows carrying a glyph become icon · label · switch. */
.connection-session-toggle:has(.option-glyph) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.connection-specific-options-panel .connection-session-toggle:has(.option-glyph) {
  grid-template-columns: auto minmax(0, 1fr) minmax(120px, 168px);
  column-gap: 13px;
}

.connection-specific-options-panel .connection-session-toggle:has(.option-glyph) > input[type="checkbox"],
.connection-specific-options-panel .connection-session-toggle:has(.option-glyph) > .kk-switch {
  grid-column: 3;
  justify-self: end;
}

.connection-specific-options-panel .connection-session-toggle:has(.option-glyph) > span {
  text-align: left;
}

/* Select rows carrying a glyph switch from a stacked label to a single
   icon · label · popup row. */
.connection-option-fields > label:has(.option-glyph) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(120px, 168px);
  column-gap: 13px;
  align-items: center;
}

.connection-option-fields > label.connection-proxy-row {
  display: grid;
  gap: 5px;
}

.connection-option-fields > label.connection-proxy-row > span {
  min-width: 0;
}

.connection-option-fields > label.connection-proxy-row > input {
  min-width: 0;
}

.connection-option-fields > label:has(.option-glyph) > select,
.connection-option-fields > label:has(.option-glyph) > input {
  grid-column: 3;
}

/* A popup <select> fills the control column, but a toggle's fixed-width switch
   would otherwise sit at the column's left edge. Pin it to the right so the
   switch lines up flush with the card edge like every other control. */
.connection-option-fields > .connection-session-toggle:has(.option-glyph) > input[type="checkbox"],
.connection-option-fields > .connection-session-toggle:has(.option-glyph) > .kk-switch {
  justify-self: end;
}

/* Dim the glyph alongside its disabled control (inherit-defaults state). */
.connection-dialog label:has(:disabled) .option-glyph,
.connection-dialog .connection-session-toggle:has(:disabled) .option-glyph {
  opacity: 0.55;
}

@keyframes fields-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.import-dialog-redesign .kk-dlg-body {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.import-dialog-redesign .kk-dlg-foot {
  position: relative;
}

.import-unified {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.import-unified > .kk-seg {
  margin: 14px 20px 0;
  width: auto;
}

.import-source-card {
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 14px 20px 0;
  padding: 11px 13px;
  background: var(--surface-muted);
  border: 0.5px solid var(--border);
  border-radius: 11px;
}

.import-source-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: white;
  background: var(--accent);
  border-radius: 9px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow) 45%, transparent);
}

.import-source-icon.bookmarks {
  background: var(--green);
}

.import-source-icon.scan {
  background: color-mix(in srgb, var(--accent) 70%, var(--text));
}

.import-source-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.import-source-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-source-copy span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-source-card .kk-btn {
  flex: 0 0 auto;
}

.import-scan-row-redesign {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.import-scan-row-redesign .kk-inp {
  max-width: 310px;
}

.import-portchips-redesign {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.import-portchips-redesign button {
  height: 28px;
  padding: 0 9px;
  color: var(--text-muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
}

.import-portchips-redesign .import-custom-port-input {
  width: 82px;
  height: 28px;
  font-size: 11.5px;
  font-weight: 650;
}

.import-portchips-redesign button.on {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.import-progress {
  position: relative;
  height: 18px;
  margin-top: 7px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.import-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  transition: width 120ms linear;
}

.import-progress-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.import-bookmark-strip {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 8px;
  max-height: 120px;
  margin: 10px 20px 0;
  overflow: auto;
}

.import-bookmark-tree-redesign {
  padding: 8px 10px;
  background: var(--surface-muted);
  border: 0.5px solid var(--border);
  border-radius: 9px;
}

.import-bookmark-node {
  display: grid;
  gap: 4px;
}

.import-bookmark-label {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  font-size: 12px;
}

.import-bookmark-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-bookmark-label small {
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-bookmark-children {
  display: grid;
  gap: 4px;
  margin-left: 18px;
}

.import-inline-error {
  margin: 10px 20px 0;
}

.import-filter-redesign {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 13px 20px;
  margin-top: 13px;
  border-bottom: 1px solid var(--hairline);
}

.import-search-redesign {
  display: flex;
  flex: 1 1 220px;
  gap: 7px;
  align-items: center;
  min-width: 180px;
  height: 30px;
  padding: 0 10px;
  color: var(--text-faint);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
}

.import-search-redesign:focus-within {
  box-shadow: var(--ring);
}

.import-search-redesign input {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  background: transparent;
  border: 0;
  outline: none;
}

.import-search-redesign button {
  display: inline-flex;
  padding: 2px;
  color: var(--text-faint);
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.import-search-redesign button:hover {
  color: var(--text);
  background: var(--hover);
}

.import-typechips-redesign {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.import-typechips-redesign button {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  color: var(--text-muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.import-typechips-redesign button:hover {
  background: var(--hover);
}

.import-typechips-redesign button.on {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.import-statusseg-redesign {
  flex: 0 0 auto;
  width: auto;
}

.import-listwrap-redesign {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.import-list-redesign {
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 12px 8px;
  overflow-y: auto;
}

.import-row-redesign {
  display: grid;
  grid-template-columns: 22px minmax(120px, 1.1fr) minmax(120px, 1fr) minmax(110px, 0.7fr) minmax(120px, 0.9fr) minmax(160px, 1.2fr);
  gap: 12px;
  align-items: center;
  min-height: 34px;
  padding: 3px 10px;
  border-radius: 7px;
}

.import-head-redesign {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 28px;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0 12px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--chrome);
  border-radius: 0;
  box-shadow: 0 0.5px 0 var(--hairline);
}

.import-candidate-redesign {
  cursor: default;
}

.import-candidate-redesign:hover {
  background: var(--hover);
}

.import-candidate-redesign.selected {
  background: var(--accent-soft);
}

.import-candidate-redesign .kk-inp,
.import-candidate-redesign .kk-sel select {
  height: 28px;
  font-size: 12px;
}

.import-folder-cell {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-folder-cell svg {
  flex: 0 0 auto;
  color: var(--text-faint);
}

.import-user-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}

.import-empty {
  margin: 0;
  padding: 40px;
  color: var(--text-faint);
  font-size: 13px;
  text-align: center;
}

.import-toolbar-redesign {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  align-items: center;
  padding: 7px 12px;
  background: var(--chrome);
  border-top: 1px solid var(--hairline);
}

.import-toolbar-lead {
  padding: 0 10px 0 4px;
  margin-right: 2px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.import-tool-redesign {
  position: relative;
}

.import-tool-redesign > button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  height: 30px;
  padding: 0 9px;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 560;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.import-tool-redesign > button:hover,
.import-tool-redesign > button.open {
  background: var(--hover);
}

.import-tool-redesign > button:disabled {
  color: var(--text-faint);
  cursor: default;
  opacity: 0.65;
}

.import-popover-redesign {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 280px;
  padding: 14px;
  background: var(--chrome);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.import-popover-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.import-bulk-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.import-bulk-scope-option {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
}

.import-destination-redesign {
  display: flex;
  gap: 9px;
  align-items: center;
}

.import-destination-redesign > span {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.import-destination-redesign > .kk-sel {
  width: 170px;
}

.import-destination-redesign > .kk-sel select {
  height: 30px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 560;
}

.import-check-redesign {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  color: white;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  cursor: pointer;
}

.import-check-redesign.on,
.import-check-redesign.ind {
  background: var(--accent);
  border-color: var(--accent);
}

.import-warnings {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12px;
}

.import-warnings ul {
  margin: 0;
  padding-left: 18px;
}

.spin {
  animation: import-spin 0.9s linear infinite;
}

@keyframes import-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.tree-error {
  margin: -4px 0 10px;
}
