.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;
}

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

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

.quick-connect-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  right: auto;
  z-index: 80;
  display: grid;
  width: 80%;
  transform: translateX(-50%);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.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);
}

.tab-quick-connect-anchor .quick-connect-menu {
  top: calc(100% + 1px);
  left: 0;
  right: auto;
  width: 260px;
  transform: none;
}

.quick-connect-menu button,
.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;
}

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

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

.quick-connect-mini-dialog {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.quick-connect-mini-dialog label {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
}

.quick-connect-mini-dialog input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: 0;
  font-size: 12px;
  font-weight: 700;
}

.quick-connect-mini-dialog input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.quick-connect-mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.quick-connect-mini-actions button:first-child {
  color: #ffffff;
  background: var(--green);
}

.quick-connect-mini-actions button:first-child:disabled {
  color: #ffffff;
  background: var(--green);
  opacity: 0.55;
}

.quick-connect-menu .connection-main,
.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);
}

.quick-connect-submenu {
  position: relative;
  min-width: 0;
}

.quick-connect-submenu::after {
  position: absolute;
  top: 0;
  left: 100%;
  width: 8px;
  height: 100%;
  content: "";
}

.quick-connect-submenu > button svg:last-child {
  margin-left: auto;
  transform: rotate(-90deg);
}

.quick-connect-submenu-panel {
  position: absolute;
  top: -1px;
  left: calc(100% + 4px);
  z-index: 81;
  display: none;
  min-width: 104px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.quick-connect-submenu:hover .quick-connect-submenu-panel,
.quick-connect-submenu:focus-within .quick-connect-submenu-panel {
  display: grid;
}

.quick-connect-submenu-panel button {
  min-height: 32px;
}

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

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

.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-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-folder-row.drop-target,
.connection-row.drop-target {
  background: var(--accent-soft);
  outline: 1px solid #8db5ff;
  outline-offset: -1px;
}

.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;
}

.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: -3px;
  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;
  padding: 2px 4px;
}

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

.connection-open {
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.connection-open > .i-icon,
.connection-open > .connection-icon-shell,
.quick-connect-menu .i-icon,
.quick-connect-menu .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);
  background: var(--connection-icon-bg);
  border-radius: 999px;
  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);
}

.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: space-between;
  gap: 10px;
}

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

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

.connection-dialog-header .panel-label {
  margin-bottom: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: none;
}

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

.connection-type-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.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: 13px;
  font-weight: 900;
}

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

.connection-appearance-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.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;
}

.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: 3;
  display: grid;
  width: 236px;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.connection-icon-bg-editor {
  position: relative;
  display: inline-flex;
}

.connection-icon-bg-edit-button {
  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-bg-edit-button:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.connection-icon-bg-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--connection-icon-bg-preview);
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
}

.connection-icon-bg-preview.active {
  color: #ffffff;
  border-style: solid;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.38);
}

.connection-icon-bg-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 3;
  display: grid;
  width: 154px;
  gap: 9px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

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

.connection-icon-bg-choice {
  width: 26px;
  height: 26px;
  padding: 0;
  cursor: pointer;
  background: var(--connection-icon-bg-choice);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.connection-icon-bg-choice.transparent {
  background:
    linear-gradient(45deg, transparent 46%, var(--red) 47%, var(--red) 53%, transparent 54%),
    var(--surface-muted);
  border-style: dashed;
}

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

.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;
}

.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 .connection-icon-image {
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  border-radius: 4px;
}

.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-endpoint-fields,
.connection-auth-fields,
.connection-session-fields,
.connection-option-fields {
  display: grid;
  min-width: 0;
  padding: 10px;
  background: var(--surface-muted);
  border-radius: 8px;
}

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

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

.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:has(.proxy-jump-input) .endpoint-host-input {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.connection-endpoint-fields:has(.proxy-jump-input) .endpoint-port-input {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.connection-endpoint-fields .proxy-jump-input {
  grid-column: 1;
  padding-top: 8px;
}

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

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

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

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

.connection-auth-fields > label:last-child,
.connection-option-fields > label: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-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: 8px;
}

.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(--border);
  border-radius: 0;
}

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

.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(--accent);
}

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

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

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


.connection-dialog-backdrop .import-dialog {
  width: min(900px, calc(100vw - 40px));
}

.import-dialog-header-text {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.import-dialog-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.import-dialog-back:hover {
  background: var(--surface-muted);
}

.import-menu {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.import-menu-tile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  color: var(--text);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    transform 150ms ease;
}

.import-menu-tile:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.import-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--accent);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.import-menu-copy {
  display: grid;
  gap: 4px;
}

.import-menu-copy small {
  color: var(--text-muted);
}

.import-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.import-file-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.import-file-path {
  flex: 1;
  min-width: 0;
}

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

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

.import-field span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.import-port-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 10px;
  margin: 0;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.import-port-list legend {
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.import-port-toggle {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.import-scan-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

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

.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-empty {
  margin: 0;
  padding: 12px;
  color: var(--text-muted);
  text-align: center;
  background: var(--surface-muted);
  border: 1px dashed var(--border);
  border-radius: 7px;
  font-size: 12px;
}

.import-preview {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.import-preview-toolbar {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.import-preview-toolbar-actions {
  display: flex;
  gap: 6px;
}

.import-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.import-bulk-actions .toolbar-button {
  white-space: nowrap;
}

.import-bulk-popover {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px 12px;
  align-items: end;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.import-bulk-field {
  min-width: 0;
}

.import-bulk-field input {
  width: 100%;
}

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

.import-bulk-scope-option {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.import-bulk-popover-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
}

@media (max-width: 720px) {
  .import-bulk-popover {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .import-bulk-popover-actions {
    justify-self: stretch;
  }
}

.import-preview-table-wrapper {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.import-preview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.import-preview-table th,
.import-preview-table td {
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.import-preview-table th {
  position: sticky;
  top: 0;
  background: var(--surface-muted);
  font-weight: 800;
  z-index: 1;
}

.import-preview-table tbody tr:last-child td {
  border-bottom: 0;
}

.import-preview-table input[type="text"],
.import-preview-table input[type="password"],
.import-preview-table input[type="number"],
.import-preview-table select {
  width: 100%;
  min-width: 60px;
  padding: 4px 6px;
  font-size: 12px;
}

.import-preview-table .import-port-input {
  width: 80px;
}

.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;
}

.import-destination {
  display: grid;
  gap: 8px;
  padding: 10px;
  margin: 0;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.import-destination legend {
  padding: 0 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.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;
}
