.installer-page {
  position: relative;
  grid-column: 2 / 5;
  grid-row: 1;
  z-index: 75;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--app-bg);
  color: var(--text);
}

.installer-page[data-active="false"] {
  visibility: hidden;
  pointer-events: none;
}

.installer-page__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.installer-page__header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.installer-page__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.installer-page__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.installer-page__last-checked {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.installer-page__last-checked--busy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.installer-page__spinner {
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: installer-spin 0.8s linear infinite;
}

@keyframes installer-spin {
  to { transform: rotate(360deg); }
}

.installer-button {
  --button-shadow-color: var(--border-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: var(--button-shadow);
}

.installer-button__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-left: 0.1rem;
}

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

.installer-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.installer-button.primary {
  --button-shadow-color: var(--accent);
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.installer-button.primary:hover:not(:disabled) {
  background: var(--accent-press);
  border-color: var(--accent-press);
}

.installer-button.primary:disabled {
  --button-shadow-color: var(--border-strong);
  background: var(--surface-muted);
  border-color: var(--border);
  color: var(--text-muted);
}

.installer-button.danger {
  --button-shadow-color: var(--red);
  border-color: var(--red);
  color: var(--red);
}

.installer-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.installer-page__sections {
  width: 100%;
  columns: 2 34rem;
  column-gap: 1rem;
}

.installer-section {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 1rem;
  padding: 0.8rem 0.85rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  break-inside: avoid;
}

.installer-section__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.installer-section__rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Icon-grid layout: tiles flow into auto-filled columns; an expanded
   tile spans the full row width so its detail body has room. */
.installer-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.installer-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 126px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 7%, transparent);
  overflow: hidden;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.installer-tile {
  cursor: pointer;
}

.installer-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.installer-tile.busy {
  border-color: var(--amber);
}

.installer-tile__head {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 9px;
  padding: 12px;
  user-select: none;
  text-align: left;
  height: 100%;
}

.installer-tile:hover .installer-tile__head {
  background: var(--hover);
}

.installer-tile:hover {
  transform: translateY(-1px);
}

.installer-tile__icon-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  background: transparent;
}

.installer-tile__icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  /* Brand SVGs from simple-icons carry their own brand fill; default.svg
     uses currentColor. Either way no extra styling needed. */
}

.installer-tile__dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-sizing: content-box;
}

.installer-tile__dot--installed {
  background: var(--green);
}

.installer-tile__dot--update {
  background: var(--accent);
}

.installer-tile__dot--busy {
  background: var(--amber);
  animation: installer-tile-pulse 1.4s ease-in-out infinite;
}

.installer-tile__dot--failed {
  background: var(--red);
}

.installer-tile__dot--partial {
  background: var(--amber);
}

@keyframes installer-tile-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.85); }
}

.installer-tile__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  align-items: stretch;
}

.installer-tile__name {
  display: block;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.installer-tile__sub {
  display: block;
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.installer-tile__sub.installer-tile__version--update {
  color: var(--accent);
  font-weight: 600;
}

.installer-tile__sub.installer-tile__version--error {
  color: var(--red);
  font-weight: 600;
}

.installer-tile__top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.installer-tile__desc {
  margin: 0;
  min-height: calc(2 * 1.45 * 11.5px);
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}

.installer-tile__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  min-width: 0;
}

.installer-tile__foot:has(.installer-tile__badge--installed):not(:has(.installer-tile__action)) {
  justify-content: center;
}

.installer-tile__versions {
  width: 100%;
  display: grid;
  grid-template-columns: 3.65rem minmax(0, 1fr);
  gap: 0.05rem 0.25rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: left;
}

@media (max-width: 980px) {
  .installer-content__scroll {
    padding: 12px;
  }

  .installer-rail {
    width: 188px;
  }
}

.installer-tile__versions div {
  display: contents;
}

.installer-tile__versions dt {
  font-weight: 500;
}

.installer-tile__versions dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.installer-tile__versions .installer-tile__version--update {
  color: var(--accent);
  font-weight: 600;
}

.installer-tile__versions .installer-tile__version--error {
  color: var(--red);
  font-weight: 600;
}

.installer-tile__web-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.installer-tile__web-link:hover {
  text-decoration: underline;
}

.installer-tile__meta {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-height: 1.65rem;
}

.installer-tile__meta:has(.installer-tile__badge[data-alone="true"]) {
  justify-content: center;
}

.installer-tile__badge {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  height: 21px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.installer-tile__badge--installed {
  background: var(--green-soft);
  color: var(--green);
}

.installer-tile__badge--update {
  background: var(--accent-soft);
  color: var(--accent);
}

.installer-tile__badge--missing {
  background: var(--surface-muted);
  color: var(--text-muted);
}

.installer-tile__action {
  flex: 0 0 auto;
  min-width: 0;
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.installer-tile__action.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.installer-tile__action:hover {
  filter: brightness(1.04);
}

.installer-tile__action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

/* ---------- InstallerToolDialog ---------- */

.installer-tool-dialog {
  position: relative;
  min-width: 32rem;
  max-width: 44rem;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1rem;
}


.installer-tool-dialog .installer-tool-dialog__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  margin: 0 2rem 0.75rem 0;
  text-align: left;
}

.installer-tool-dialog__header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.installer-tool-dialog__version {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.installer-tool-dialog__icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
}

.installer-tool-dialog__body {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.25rem 0 0.5rem;
}

.installer-tool-dialog__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.installer-tool-dialog__update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
}

.installer-tool-dialog__grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 0.85rem;
  margin: 0;
  font-size: 0.85rem;
}

.installer-tool-dialog__grid dt {
  color: var(--text-muted);
  font-weight: 500;
}

.installer-tool-dialog__grid dd {
  margin: 0;
  word-break: break-word;
}

.installer-tool-dialog__grid dd code {
  font-size: 0.8rem;
  background: var(--surface-muted);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.installer-tool-dialog__value-error {
  color: var(--red);
}

.installer-tool-dialog__inline-action {
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.installer-tool-dialog__inline-action:disabled {
  color: var(--text-muted);
  cursor: default;
}

.installer-tool-dialog__prereqs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.installer-tool-dialog__prereqs li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.installer-tool-dialog__prereqs li[data-installed="true"] span:last-child {
  color: var(--green);
}

.installer-tool-dialog__prereqs li[data-installed="false"] span:last-child {
  color: var(--amber);
}

.installer-tool-dialog__quick-launch {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.installer-tool-dialog__quick-launch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.installer-tool-dialog__quick-launch-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.installer-tool-dialog__quick-launch-search {
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.85rem;
}

.installer-tool-dialog__quick-launch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.installer-tool-dialog__quick-launch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--border);
}

.installer-tool-dialog__quick-launch-item:last-child {
  border-bottom: none;
}

.installer-tool-dialog__quick-launch-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.installer-tool-dialog__quick-launch-name {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.installer-tool-dialog__quick-launch-name code {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface-muted);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-weight: 400;
}

.installer-tool-dialog__quick-launch-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.installer-tool-dialog__quick-launch-badge {
  flex: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

.installer-tool-dialog__quick-launch-item .secondary-button {
  flex: none;
}

.installer-tool-dialog__quick-launch-empty {
  padding: 0.6rem 0.55rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.installer-tool-dialog__pin {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.installer-tool-dialog__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
  padding: 0.75rem;
  border-radius: 6px;
  background: var(--surface-muted);
}

.installer-tool-dialog__options label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.installer-tool-dialog__options input[type="text"],
.installer-tool-dialog__options select {
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
}

.installer-tool-dialog__options label:has(> input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
}

.installer-tool-dialog__option-hint {
  color: var(--amber);
  font-size: 0.75rem;
  line-height: 1.35;
}

.installer-tool-dialog__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--amber);
}

.installer-tool-dialog__hint--warn {
  color: var(--amber);
}

.installer-tool-dialog__hint--error {
  color: var(--red);
}

.installer-tool-dialog__actions {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ---- WSL distro manager ---- */
.installer-wsl-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.installer-wsl-section + .installer-wsl-section {
  margin-top: 0.6rem;
}

.installer-wsl-section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.installer-wsl-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.installer-wsl-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name actions"
    "meta actions";
  align-items: center;
  gap: 0.1rem 0.75rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.installer-wsl-row__name {
  grid-area: name;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.installer-wsl-row__meta {
  grid-area: meta;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.installer-wsl-row__actions {
  grid-area: actions;
  display: flex;
  gap: 0.4rem;
}

.installer-wsl-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--green);
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 15%, transparent);
}

.installer-wsl-install-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.installer-wsl-install-row select {
  flex: 1;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
}

/* ---------- InstallerInstallStepper ---------- */

.installer-stepper {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.installer-stepper--legacy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.installer-stepper__legacy-step {
  font-weight: 500;
  font-size: 0.9rem;
}

.installer-stepper__row {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.installer-stepper__row[data-active="true"] {
  border-color: var(--accent);
}

.installer-stepper__row-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.installer-stepper__row-head:hover {
  background: var(--surface-muted);
}

.installer-stepper__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.installer-stepper__dot--running {
  background: var(--amber);
  border-color: var(--amber);
  animation: installer-tile-pulse 1.2s ease-in-out infinite;
}

.installer-stepper__dot--done {
  background: var(--green);
  border-color: var(--green);
}

.installer-stepper__dot--failed {
  background: var(--red);
  border-color: var(--red);
}

.installer-stepper__label {
  flex: 1 1 auto;
  font-size: 0.875rem;
}

.installer-stepper__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.installer-stepper__row-body {
  padding: 0 0.75rem 0.6rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
}

.installer-stepper__bar {
  width: 100%;
  height: 6px;
}

.installer-stepper__log {
  margin: 0;
  padding: 0.5rem;
  background: var(--terminal, #1a1a1a);
  color: var(--terminal-fg, #ddd);
  border-radius: 4px;
  font-size: 0.75rem;
  max-height: 10rem;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.installer-confirm-items {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.installer-confirm-footer {
  margin-top: 0.5rem;
}

/* ======================================================================
   House-style shell — SFTP/Finder-flavoured top bar + toolbar + rail +
   List/Gallery content + footer. Mirrors the file-browser pattern in
   src/modules/workspace/connections/sftp; reads only design tokens.
   ====================================================================== */

/* ---- top bar (no macOS chrome; kind glyph + title + status pill) ---- */
.installer-module-header {
  flex: 0 0 auto;
  min-height: 44px;
}

.installer-topbar__kind {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.installer-conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.installer-conn-pill svg {
  color: var(--text-faint);
}

.installer-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.installer-icon-btn:hover {
  background: var(--hover);
  color: var(--text);
}

.installer-icon-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.installer-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.installer-crumb svg {
  color: var(--tint, var(--accent));
}

.installer-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  width: clamp(128px, 16vw, 180px);
  min-width: 110px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text-faint);
  box-shadow: inset 0 0 0 1px var(--border);
}

.installer-search svg {
  flex: 0 0 auto;
}

.installer-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.installer-search input::placeholder {
  color: var(--text-faint);
}

.installer-segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--chrome-strong);
  box-shadow: inset 0 0 0 1px var(--border);
}

.installer-segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.installer-segmented button:hover {
  color: var(--text);
}

.installer-segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.installer-module-header .installer-button {
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
  line-height: 1;
}

/* ---- body: rail | content ---- */
.installer-panes {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

@media (max-width: 1080px) {
  .installer-module-header .installer-conn-pill,
  .installer-module-header .installer-crumb {
    display: none;
  }
}

.installer-rail {
  flex: 0 0 auto;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 10px;
  overflow-y: auto;
  background: var(--surface-muted);
  border-right: 1px solid var(--hairline);
}

.installer-rail.collapsed {
  display: none;
}

.installer-rail__section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.installer-rail__head {
  padding: 0 8px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.installer-rail__list {
  display: grid;
  gap: 1px;
}

.installer-sb-row {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}

.installer-sb-row:hover {
  background: var(--hover);
}

.installer-sb-row.active {
  background: var(--accent);
  color: #fff;
}

.installer-sb-row__ico {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--tint, var(--accent));
}

.installer-sb-row.active .installer-sb-row__ico {
  color: #fff;
}

.installer-sb-row__nm {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.installer-sb-row__count {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.installer-sb-row.active .installer-sb-row__count {
  color: rgba(255, 255, 255, 0.82);
}

.installer-sb-row__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: auto;
}

.installer-sb-row__dot + .installer-sb-row__count {
  margin-left: 7px;
}

.installer-sb-row.active .installer-sb-row__dot {
  background: #fff;
}

.installer-content {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
}

[data-color-scheme="default"] .installer-content,
[data-color-scheme="mac"] .installer-content {
  background: var(--surface);
}

.installer-content__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
}

.installer-empty--inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 16px;
  color: var(--text-faint);
}

/* ---- gallery grid + group headers ---- */
.installer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.installer-group {
  margin-bottom: 18px;
}

.installer-group + .installer-group {
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.installer-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.installer-group__glyph {
  display: inline-flex;
  color: var(--tint, var(--accent));
}

.installer-group__count {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 12px;
}

/* ---- list view ---- */
.installer-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1240px;
}

.installer-listhead {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px 116px 120px 92px;
  gap: 10px;
  align-items: center;
  padding: 0 10px 8px;
  background: var(--app-bg);
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-color-scheme="default"] .installer-listhead,
[data-color-scheme="mac"] .installer-listhead {
  background: var(--surface);
}

.installer-listhead__action {
  text-align: right;
}

.installer-list__grouphead {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 4px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.installer-listrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px 116px 120px 92px;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}

.installer-listrow:hover {
  background: var(--hover);
}

.installer-listrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.installer-listrow__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.installer-listrow__icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: 0 0 auto;
}

.installer-listrow__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.installer-listrow__text b {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.installer-listrow__ver {
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.installer-listrow__ver--muted {
  color: var(--text-muted);
}

.installer-listrow__ver--update {
  color: var(--accent);
  font-weight: 600;
}

.installer-listrow__ver--error {
  color: var(--red);
  font-weight: 600;
}

.installer-listrow__status {
  min-width: 0;
}

.installer-listrow__action {
  display: flex;
  justify-content: flex-end;
}

/* ---- shared status pill + compact action button ---- */
.installer-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.installer-pill[data-tone="installed"] {
  background: var(--green-soft);
  color: var(--green);
}

.installer-pill[data-tone="update"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.installer-pill[data-tone="failed"] {
  background: color-mix(in srgb, var(--red) 14%, transparent);
  color: var(--red);
}

.installer-pill[data-tone="busy"],
.installer-pill[data-tone="partial"] {
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  color: var(--amber);
}

.installer-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.installer-act:hover {
  background: var(--surface-muted);
}

.installer-act.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.installer-act:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
