:root,
:root[data-theme="dark"] {
  --text-muted: #948b7f;
  --surface: #24221f;
  --surface-raised: #2b2925;
  --ag-ok-bg: rgba(143, 190, 149, 0.14);
  --ag-ok-border: rgba(143, 190, 149, 0.35);
  --ag-warning-bg: rgba(229, 176, 110, 0.13);
  --ag-warning-border: rgba(229, 176, 110, 0.34);
  --ag-danger-bg: rgba(224, 95, 88, 0.13);
  --ag-danger-border: rgba(224, 95, 88, 0.36);
  --ag-info-bg: rgba(217, 119, 87, 0.14);
  --ag-info-border: rgba(217, 119, 87, 0.34);
  --ag-online-dot: #63d957;
}

/* Shared fleet context, readiness, and progressive history disclosure */
.fleet-scope-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 13.5rem;
  padding: 0.48rem 0.62rem;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel-2) 88%, transparent);
}

.fleet-scope-mark {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, var(--border));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent-2) 8%, var(--panel));
}

.fleet-scope-mark .ag-icon { width: 0.9rem; height: 0.9rem; }

.fleet-scope-copy {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.fleet-scope-copy small {
  color: var(--text-muted);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.fleet-scope-copy strong {
  overflow: hidden;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-scope-readiness {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-dim);
  font-size: 0.62rem;
  font-weight: 750;
  white-space: nowrap;
}

.fleet-scope-readiness i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 14%, transparent);
}

.fleet-scope-summary.is-loading .fleet-scope-readiness i {
  background: var(--warning);
  animation: ag-fleet-readiness-pulse 1.2s ease-in-out infinite;
}

.fleet-scope-summary.is-partial .fleet-scope-readiness i { background: var(--warning); }
.fleet-scope-summary.is-unavailable .fleet-scope-readiness i { background: var(--danger); }

.ssh-fleet-scope-summary { align-self: center; }

.ag-fleet-scope-control {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.05rem 0.48rem;
  align-items: center;
  min-width: 8.5rem;
}

.ag-fleet-scope-control .ag-workspace-label { grid-column: 1 / -1; }

.ag-fleet-scope-control strong {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--text);
  font-size: 0.72rem;
}

.ag-fleet-scope-control strong .ag-icon { width: 0.8rem; height: 0.8rem; color: var(--accent-2); }
.ag-fleet-scope-control small { color: var(--text-muted); font-size: 0.58rem; white-space: nowrap; }

.fleet-picker-skeleton {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(8rem, 1fr));
  gap: 0.45rem;
  align-items: center;
}

.fleet-picker-skeleton span {
  display: block;
  min-height: 3.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2));
  background-size: 220% 100%;
  animation: ag-fleet-skeleton 1.4s ease-in-out infinite;
}

.fleet-picker-skeleton strong {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.ssh-fleet-select-grid.is-loading {
  position: relative;
}

.ssh-fleet-select-card.is-loading {
  opacity: 0.78;
  cursor: progress;
  border-color: color-mix(in srgb, var(--warning) 40%, var(--border));
}

.ssh-fleet-select-card.is-loading .ssh-fleet-select-card-head > span {
  color: var(--warning);
}

.ssh-fleet-card-spinner {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.28rem;
  border: 1.5px solid color-mix(in srgb, var(--warning) 35%, transparent);
  border-top-color: var(--warning);
  border-radius: 999px;
  vertical-align: -0.1rem;
  animation: ag-fleet-spin 0.75s linear infinite;
}

.stage-start-button.is-busy .ag-icon {
  animation: ag-fleet-spin 0.9s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .ssh-fleet-card-spinner,
  .stage-start-button.is-busy .ag-icon { animation: none; }
}

.sc-run-toggle,
.ssh-fleet-run-toggle {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: none;
  place-items: center;
  padding: 0;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel-2);
}

.sc-run-toggle:hover,
.ssh-fleet-run-toggle:hover {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 45%, var(--border));
}

.sc-run-toggle .ag-icon,
.ssh-fleet-run-toggle .ag-icon { width: 0.82rem; height: 0.82rem; }

.sc-runs > header .sc-history-count,
.ssh-fleet-history-tools > span {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.sc-history-pagination,
.ssh-fleet-history-pagination { padding: 0 0.9rem 0.9rem; }

.ssh-fleet-history-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.ssh-fleet-run:not(.is-expanded) .ssh-fleet-run-header,
.sc-run-row:not(.is-expanded) > header { border-bottom: 0; }

.server-fleet-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
}

.server-fleet-summary > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-right: 1px solid var(--border);
}

.server-fleet-summary > div:last-child { border-right: 0; }
.server-fleet-summary dt { color: var(--text-muted); font-size: 0.62rem; font-weight: 750; }
.server-fleet-summary dd { margin: 0; color: var(--text); font: 850 0.9rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.server-fleet-summary .is-ready dd { color: var(--ok); }
.server-fleet-summary .is-offline dd { color: var(--danger); }
.server-fleet-summary .is-busy dd { color: var(--warning); }
.server-status-copy.is-ready { color: var(--ok); }
.server-status-copy.is-offline { color: var(--danger); }
.server-status-copy.is-degraded { color: var(--warning); }
.server-status-dot.is-degraded {
  background: var(--warning);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 18%, transparent);
}

/* Repair circuit-breaker (quarantine), fleet update rollout, and repair states */
.server-fleet-summary .is-quarantined dd { color: var(--danger); }
.server-status-copy.is-quarantined { color: var(--danger); }
.server-status-dot.is-quarantined {
  background: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent);
}
.server-quarantine-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 750;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 38%, transparent);
}
.server-quarantine-chip [class*="hero-"] { width: 0.85rem; height: 0.85rem; }
.server-card.is-quarantined {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
}
.server-card.is-deploying {
  border-color: color-mix(in srgb, var(--warning) 45%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--warning) 25%, transparent);
}
.server-rollout-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 0.2rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  color: var(--text);
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 34%, transparent);
}
.server-rollout-banner-copy { display: flex; flex-direction: column; gap: 0.1rem; }
.server-rollout-banner-copy strong { font-size: 0.82rem; font-weight: 800; }
.server-rollout-banner-copy span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Durable deployment-rollout history (ControlPlane runs) */
.rollout-history-list { display: flex; flex-direction: column; gap: 0.4rem; }
.rollout-history-entry {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.rollout-history-entry.is-interrupted,
.rollout-history-entry.is-halted {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--border));
}
.rollout-history-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--text-muted);
}
.rollout-history-dot.is-running { background: var(--warning); }
.rollout-history-dot.is-completed { background: var(--ok); }
.rollout-history-dot.is-halted,
.rollout-history-dot.is-interrupted { background: var(--danger); }
.rollout-history-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1 1 auto; }
.rollout-history-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.rollout-history-head strong { font-size: 0.82rem; font-weight: 800; }
.rollout-history-mode {
  font-size: 0.6rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.rollout-history-counts {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.rollout-history-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rollout-history-meta code { font-size: 0.66rem; }

@keyframes ag-fleet-readiness-pulse {
  50% { opacity: 0.45; transform: scale(0.82); }
}

@keyframes ag-fleet-skeleton {
  to { background-position: -220% 0; }
}

@media (max-width: 900px) {
  .sc-cockpit-head .fleet-scope-summary { order: 3; width: 100%; }
  .server-fleet-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-fleet-summary > div:nth-child(2) { border-right: 0; }
  .server-fleet-summary > div:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 620px) {
  .fleet-scope-summary { min-width: 0; width: 100%; }
  .fleet-picker-skeleton { grid-template-columns: 1fr; }
  .ssh-fleet-history-tools { align-items: flex-start; flex-direction: column; }
  .server-fleet-summary { grid-template-columns: 1fr; }
  .server-fleet-summary > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .server-fleet-summary > div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fleet-scope-summary.is-loading .fleet-scope-readiness i,
  .fleet-picker-skeleton span { animation: none; }
}

:root[data-theme="light"] {
  --text-muted: #718096;
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --ag-ok-bg: rgba(5, 150, 105, 0.1);
  --ag-ok-border: rgba(5, 150, 105, 0.24);
  --ag-warning-bg: rgba(217, 119, 6, 0.11);
  --ag-warning-border: rgba(217, 119, 6, 0.26);
  --ag-danger-bg: rgba(220, 38, 38, 0.1);
  --ag-danger-border: rgba(220, 38, 38, 0.24);
  --ag-info-bg: rgba(2, 132, 199, 0.1);
  --ag-info-border: rgba(2, 132, 199, 0.24);
  --ag-online-dot: #16a34a;
}

html,
body {
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 12% -10%, rgba(217, 119, 87, 0.09), transparent 29rem),
    radial-gradient(circle at 92% 4%, rgba(229, 176, 110, 0.045), transparent 24rem);
}

.ag-skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.75rem;
  color: #17130f;
  background: var(--accent-2);
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.ag-skip-link:focus {
  transform: translateY(0);
}

.ag-topbar {
  gap: 0.8rem;
  min-height: 60px;
  padding: 0.58rem 1rem;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(18px) saturate(125%);
  border-bottom: 1px solid var(--line);
}

.ag-nav-left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.ag-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.ag-brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--accent-2);
  background: var(--ag-info-bg);
  border: 1px solid var(--ag-info-border);
  border-radius: 8px;
}

.ag-brand-mark .ag-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.ag-brand-name {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.ag-tabs {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 0.28rem;
  margin-left: 0.35rem;
  min-width: 0;
  overflow: visible;
  scrollbar-width: none;
}

.ag-tabs::-webkit-scrollbar {
  display: none;
}

.ag-nav-left:has(.ag-tab-group:hover),
.ag-nav-left:has(.ag-tab-group:focus-within),
.ag-nav-left:has(.ag-tab-group[open]) {
  position: relative;
  z-index: 60;
}

.ag-tabs:has(.ag-tab-group:hover),
.ag-tabs:has(.ag-tab-group:focus-within),
.ag-tabs:has(.ag-tab-group[open]) {
  overflow: visible;
}

.ag-tab {
  position: relative;
  display: inline-grid;
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0;
  text-decoration: none;
  transition: background 170ms ease, border-color 170ms ease, color 170ms ease, transform 170ms ease;
}

.ag-tab:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--panel-2);
  transform: translateY(-1px);
}

.ag-tab.active {
  color: var(--text);
  border-color: rgba(217, 119, 87, 0.48);
  background:
    linear-gradient(180deg, rgba(217, 119, 87, 0.18), rgba(229, 176, 110, 0.09)),
    var(--panel-2);
  box-shadow: inset 0 1px 0 rgba(250, 249, 245, 0.07);
}

.ag-tab:active {
  transform: translateY(0) scale(0.96);
}

.ag-tab:focus-visible,
.ag-server-link:focus-visible,
.ag-icon-action:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.ag-tab .ag-icon {
  width: 1.08rem;
  height: 1.08rem;
}

.ag-tab-service-logo {
  display: block;
  width: 1.08rem;
  height: 1.08rem;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

.ag-tab-tooltip {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.55rem);
  left: 50%;
  width: max-content;
  max-width: 10rem;
  padding: 0.34rem 0.48rem;
  color: var(--text);
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 10px 28px var(--shadow);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -0.25rem);
  transition: opacity 130ms ease, transform 130ms ease;
}

.ag-tab:hover .ag-tab-tooltip,
.ag-tab:focus-visible .ag-tab-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.ag-tab-group {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.ag-tab-group > summary {
  list-style: none;
}

.ag-tab-group > summary::-webkit-details-marker {
  display: none;
}

.ag-tab-group::after {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.45rem;
  content: "";
}

.ag-tab-parent {
  position: relative;
  cursor: pointer;
  appearance: none;
  padding-right: 0.22rem;
  font-family: inherit;
}

.ag-tab-parent::after {
  display: none;
}

.ag-tab-menu-chevron {
  width: 0.62rem;
  height: 0.62rem;
  margin-left: -0.18rem;
  transition: transform 130ms ease;
}

.ag-tab-group:hover .ag-tab-menu-chevron,
.ag-tab-group:focus-within .ag-tab-menu-chevron,
.ag-tab-group[open] .ag-tab-menu-chevron {
  transform: rotate(180deg);
}

.ag-tab-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.35rem);
  left: 0;
  display: none;
  min-width: 9.5rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 44px var(--shadow);
  pointer-events: auto;
}

.ag-tab-group:hover .ag-tab-menu,
.ag-tab-group:focus-within .ag-tab-menu,
.ag-tab-group[open] .ag-tab-menu {
  display: grid;
  gap: 0.2rem;
}

.ag-tab-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0.48rem 0.58rem;
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
}

.ag-tab-menu-item .ag-icon {
  width: 0.88rem;
  height: 0.88rem;
}

.ag-tab-menu-item:hover,
.ag-tab-menu-item.active {
  color: var(--text);
  border-color: rgba(217, 119, 87, 0.36);
  background: var(--panel-2);
}

.ag-nav-right {
  flex-shrink: 0;
  gap: 0.38rem;
}

.ag-workspace-cluster,
.ag-status-cluster {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  min-height: 2.65rem;
  padding: 0.22rem;
  border: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(250, 249, 245, 0.035), transparent),
    color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(250, 249, 245, 0.04),
    0 8px 24px color-mix(in srgb, var(--shadow) 35%, transparent);
}

.ag-workspace-control {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  height: 2.15rem;
  padding-left: 0.48rem;
}

.ag-workspace-label {
  color: var(--text-muted);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.ag-server-switcher {
  position: relative;
  min-width: 0;
}

.ag-fleet-work {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.38rem;
  align-items: center;
  min-width: 3.65rem;
  height: 2.15rem;
  padding: 0.25rem 0.48rem;
  color: var(--text);
  background: var(--ag-ok-bg);
  border: 1px solid var(--ag-ok-border);
  border-radius: 7px;
  font-variant-numeric: tabular-nums;
}

.ag-fleet-work strong {
  align-self: end;
  font-size: 0.72rem;
  line-height: 1;
}

.ag-fleet-work > span:last-child {
  grid-column: 2;
  align-self: start;
  color: var(--text-dim);
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.ag-fleet-pulse {
  grid-row: 1 / -1;
  width: 0.48rem;
  height: 0.48rem;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--ag-ok-border);
  animation: ag-fleet-pulse 1.8s ease-out infinite;
}

@keyframes ag-fleet-pulse {
  70% { box-shadow: 0 0 0 0.32rem transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.ag-server-link {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-width: 2.2rem;
  height: 2.15rem;
  justify-content: center;
  gap: 0.38rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 0.55rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.ag-server-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--panel-2);
}

.ag-server-link.active {
  color: var(--accent-2);
  border-color: var(--ag-info-border);
  background: var(--ag-info-bg);
}

.ag-server-link .ag-icon {
  width: 1rem;
  height: 1rem;
}

.ag-server-link-label {
  font-size: 0.64rem;
  line-height: 1;
}

.ag-status-cluster {
  gap: 0;
}

.ag-status-cluster .ns-system-load {
  overflow: visible;
}

.ag-status-cluster .ns-host-load {
  min-width: 132px;
  padding: 0.26rem 0.48rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
}

.ag-status-cluster .ns-host-load-head {
  margin-bottom: 0.18rem;
}

.ag-status-cluster .ns-host-load-grid {
  gap: 0.14rem;
}

.ag-status-cluster .ns-load-meter {
  grid-template-columns: 25px minmax(38px, 1fr) 30px;
  gap: 0.28rem;
}

.ag-utility-cluster {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  margin-left: 0.12rem;
  padding-left: 0.3rem;
  border-left: 1px solid var(--border);
}

.ag-utility-cluster .ns-icon-btn,
.ag-utility-cluster .ag-icon-action {
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.ag-utility-cluster .ns-icon-btn:hover,
.ag-utility-cluster .ag-icon-action:hover {
  background: var(--panel-2);
}

.ag-icon-action {
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.ag-icon-action:hover {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
  transform: translateY(-1px);
}

.ag-icon-action .ag-icon {
  width: 1rem;
  height: 1rem;
}

.ag-page {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 1.75rem;
}

.ag-page-netscan {
  width: 100%;
  max-width: none;
  padding: 0;
}

.ag-content-shell {
  min-height: calc(100vh - 64px);
}

.ag-page-netscan .ns-dashboard,
.ag-page-netscan .ns-main {
  min-height: auto;
}

.ag-monitor-head {
  margin: 1.25rem 1.25rem 0;
}

.ag-monitor-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
}

.card,
.scan-card,
.test-progress {
  background:
    linear-gradient(180deg, rgba(250, 249, 245, 0.045), rgba(250, 249, 245, 0.015)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 18px 44px var(--shadow);
}

.card {
  padding: 1.35rem;
  margin-bottom: 1.25rem;
}

.card-header,
.scan-card-head,
.test-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.25;
}

.card-header {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
  text-transform: none;
}

label {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 850;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[type="week"],
textarea,
select {
  width: 100%;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.62rem 0.72rem;
  font: inherit;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

select {
  min-height: 2.65rem;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.35rem;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.78;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
  line-height: 1.45;
  font-family: "SF Mono", "Cascadia Code", "Fira Code", ui-monospace, monospace;
}

input[type="checkbox"].ag-check {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 20px;
  min-width: 20px;
  height: 20px;
  color: #17130f;
  background: var(--panel-2);
  border: 2px solid var(--text-muted);
  border-radius: 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  vertical-align: middle;
}

input[type="checkbox"].ag-check:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

input[type="checkbox"].ag-check:checked::after {
  width: 5px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) translate(-1px, -1px);
}

input[type="checkbox"].ag-check:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.16);
}

.form-group {
  margin-bottom: 1rem;
}

.form-row,
.form-actions,
.scan-title,
.scan-actions,
.scan-meta,
.diagnostic-row,
.runtime-strip,
.link-row,
.flex {
  display: flex;
}

.form-row {
  gap: 1rem;
}

.batch-toolbar {
  align-items: flex-end;
  padding: 0.85rem;
  margin-bottom: 1rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.batch-toolbar .form-group {
  margin-bottom: 0;
}

.batch-actions {
  max-width: 180px;
}

.form-row .form-group {
  flex: 1;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: min(320px, 100%);
}

.sort-control-inline {
  flex-shrink: 0;
}

.sort-control label {
  margin-bottom: 0;
  white-space: nowrap;
}

.sort-control select {
  min-height: 36px;
  padding-block: 0.42rem;
  font-size: 0.78rem;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 0 0;
  color: var(--text-dim);
  font-size: 0.76rem;
}

.pagination-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination-actions button {
  min-height: 30px;
  padding: 0.32rem 0.62rem;
  font-size: 0.74rem;
}

.pagination-actions span,
.pagination-summary {
  font-weight: 750;
}

.form-actions,
.scan-card-head {
  align-items: center;
  justify-content: space-between;
}

.scan-title,
.scan-actions,
.scan-meta,
.diagnostic-row,
.runtime-strip,
.link-row {
  align-items: center;
  flex-wrap: wrap;
}

.scan-actions {
  gap: 0.5rem;
  justify-content: flex-end;
}

.resource-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.resource-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.28rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.resource-action.icon-only {
  width: 2.1rem;
  min-width: 2.1rem;
  height: 2.1rem;
  min-height: 2.1rem;
  padding: 0;
}

.resource-action:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--panel-3);
}

.resource-action-primary {
  color: #17130f;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.resource-action.danger {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

.resource-action .ag-icon {
  width: 0.86rem;
  height: 0.86rem;
}

.proxy-list-actions {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: max-content;
}

.proxy-list-card-header {
  align-items: flex-end;
  flex-wrap: wrap;
}

.proxy-list-card-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 38px;
}

.proxy-list-upload-control {
  width: min(280px, 100%);
  margin: 0;
}

.proxy-list-upload-control .ns-field {
  display: grid;
  gap: 0.3rem;
  margin: 0;
}

.proxy-list-upload-control .ns-field > span {
  color: var(--text-muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.proxy-list-upload-control select {
  min-height: 38px;
  margin: 0;
  font-weight: 750;
}

.proxy-list-upload-button {
  display: inline-flex;
  min-width: 82px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  font-size: 0.7rem;
  line-height: 1;
}

.proxy-list-upload-button .ag-icon {
  width: 0.8rem;
  height: 0.8rem;
}

.fast-picker-form {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.fast-count-input {
  width: 52px;
  min-height: 34px;
  padding: 0.28rem 0.35rem;
  font-size: 0.74rem;
  font-weight: 850;
  text-align: center;
}

.fast-pick-button {
  min-width: 48px;
  min-height: 34px;
  padding: 0.28rem 0.45rem;
  font-size: 0.72rem;
  line-height: 1;
}

.proxy-row-actions {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: max-content;
}

.proxy-list-name-cell {
  font-size: 0.82rem;
}

.proxy-list-link {
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.proxy-list-link:hover {
  color: var(--accent-2);
}

@media (max-width: 720px) {
  .proxy-list-card-header {
    align-items: stretch;
  }

  .proxy-list-card-title,
  .proxy-list-upload-control {
    width: 100%;
  }
}

.proxy-detail-head {
  align-items: flex-start;
}

.proxy-detail-title {
  margin-top: 0.35rem;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 850;
}

.proxy-detail-stats {
  justify-content: flex-start;
  padding: 0.2rem 0 0;
}

.proxy-raw-cell {
  max-width: 520px;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.proxy-runtime-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.proxy-runtime-cell strong {
  color: var(--text);
}

.proxy-edit-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 0.45rem 0;
}

.proxy-edit-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.proxy-list-icon-button,
.fast-preset-button {
  flex: 0 0 auto;
  border-radius: 7px;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1;
}

.proxy-list-icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
}

.fast-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 0.25rem;
}

.fast-preset-button {
  width: 34px;
  min-width: 34px;
  min-height: 26px;
  color: var(--text);
  font-weight: 850;
}

.ag-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  vertical-align: middle;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-square-2-stack,
.hero-play,
.hero-no-symbol,
.hero-trash,
.hero-pencil-square,
.hero-eye,
.hero-stop-circle,
.hero-arrow-down-tray,
.hero-server-stack,
.hero-globe-alt,
.hero-bolt,
.hero-cpu-chip,
.hero-clock,
.hero-user,
.hero-key,
.hero-arrow-path,
.hero-command-line,
.hero-arrows-right-left,
.hero-finger-print,
.hero-magnifying-glass,
.hero-share,
.hero-document-text,
.hero-moon,
.hero-sun,
.hero-arrow-right-start-on-rectangle,
.hero-chevron-left,
.hero-chevron-right,
.hero-check-circle,
.hero-arrow-right-circle,
.hero-plus,
.hero-x-mark-solid,
.hero-network,
.hero-adjustments-horizontal,
.hero-archive-box-arrow-down,
.hero-arrow-left,
.hero-arrow-up-right,
.hero-arrows-up-down,
.hero-chevron-down,
.hero-chevron-up,
.hero-cube-transparent,
.hero-document-duplicate,
.hero-envelope,
.hero-funnel,
.hero-information-circle,
.hero-pause,
.hero-queue-list,
.hero-scale,
.hero-shield-check,
.hero-signal,
.hero-signal-slash,
.hero-squares-2x2,
.hero-stop,
.hero-x-mark {
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.hero-square-2-stack {
  --hero-square-2-stack: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6A2.25 2.25 0 0 0 14.25 3.75H6A2.25 2.25 0 0 0 3.75 6v8.25A2.25 2.25 0 0 0 6 16.5h2.25m8.25-8.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-7.5A2.25 2.25 0 0 1 8.25 18v-7.5a2.25 2.25 0 0 1 2.25-2.25h6Z"/></svg>');
  -webkit-mask-image: var(--hero-square-2-stack);
  mask-image: var(--hero-square-2-stack);
}

.hero-play {
  --hero-play: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.5 5.653c0-1.427 1.529-2.33 2.779-1.643l11.54 6.347c1.295.712 1.295 2.573 0 3.286L7.28 19.99c-1.25.687-2.779-.217-2.779-1.643V5.653Z" clip-rule="evenodd"/></svg>');
  -webkit-mask-image: var(--hero-play);
  mask-image: var(--hero-play);
}

.hero-no-symbol {
  --hero-no-symbol: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636"/></svg>');
  -webkit-mask-image: var(--hero-no-symbol);
  mask-image: var(--hero-no-symbol);
}

.hero-trash {
  --hero-trash: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673A2.25 2.25 0 0 1 15.916 21.75H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"/></svg>');
  -webkit-mask-image: var(--hero-trash);
  mask-image: var(--hero-trash);
}

.hero-pencil-square {
  --hero-pencil-square: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"/></svg>');
  -webkit-mask-image: var(--hero-pencil-square);
  mask-image: var(--hero-pencil-square);
}

.hero-eye {
  --hero-eye: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/></svg>');
  -webkit-mask-image: var(--hero-eye);
  mask-image: var(--hero-eye);
}

.hero-stop-circle {
  --hero-stop-circle: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z" stroke="black" stroke-width="1.7"/><path d="M9 9h6v6H9z" fill="black" rx="1"/></svg>');
  -webkit-mask-image: var(--hero-stop-circle);
  mask-image: var(--hero-stop-circle);
}

.hero-arrow-down-tray {
  --hero-arrow-down-tray: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M7.5 10.5 12 15m0 0 4.5-4.5M12 15V3"/></svg>');
  -webkit-mask-image: var(--hero-arrow-down-tray);
  mask-image: var(--hero-arrow-down-tray);
}

.hero-server-stack {
  --hero-server-stack: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 7.5A2.25 2.25 0 0 1 6 5.25h12a2.25 2.25 0 0 1 2.25 2.25v1.5A2.25 2.25 0 0 1 18 11.25H6A2.25 2.25 0 0 1 3.75 9V7.5Zm0 7.5A2.25 2.25 0 0 1 6 12.75h12A2.25 2.25 0 0 1 20.25 15v1.5A2.25 2.25 0 0 1 18 18.75H6a2.25 2.25 0 0 1-2.25-2.25V15Zm3-7.125h.008v.008H6.75v-.008Zm0 7.5h.008v.008H6.75v-.008Z"/></svg>');
  -webkit-mask-image: var(--hero-server-stack);
  mask-image: var(--hero-server-stack);
}

.hero-globe-alt {
  --hero-globe-alt: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9 9 0 1 0 0-18m0 18a9 9 0 1 1 0-18m0 18c2.25-2.45 3.375-5.45 3.375-9S14.25 5.45 12 3m0 18c-2.25-2.45-3.375-5.45-3.375-9S9.75 5.45 12 3M3.75 12h16.5"/></svg>');
  -webkit-mask-image: var(--hero-globe-alt);
  mask-image: var(--hero-globe-alt);
}

.hero-bolt {
  --hero-bolt: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m13.5 2.25-9 11.25h7.5l-1.5 8.25 9-11.25H12l1.5-8.25Z"/></svg>');
  -webkit-mask-image: var(--hero-bolt);
  mask-image: var(--hero-bolt);
}

.hero-cpu-chip {
  --hero-cpu-chip: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 3v2.25M12 3v2.25M15.75 3v2.25M8.25 18.75V21M12 18.75V21m3.75-2.25V21M3 8.25h2.25M3 12h2.25M3 15.75h2.25m13.5-7.5H21M18.75 12H21m-2.25 3.75H21M7.5 5.25h9A2.25 2.25 0 0 1 18.75 7.5v9A2.25 2.25 0 0 1 16.5 18.75h-9A2.25 2.25 0 0 1 5.25 16.5v-9A2.25 2.25 0 0 1 7.5 5.25Zm2.25 4.5h4.5v4.5h-4.5v-4.5Z"/></svg>');
  -webkit-mask-image: var(--hero-cpu-chip);
  mask-image: var(--hero-cpu-chip);
}

.hero-clock {
  --hero-clock: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6l3.75 2.25M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/></svg>');
  -webkit-mask-image: var(--hero-clock);
  mask-image: var(--hero-clock);
}

.hero-user {
  --hero-user: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 7.5a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.5 20.25a8.25 8.25 0 0 1 15 0"/></svg>');
  -webkit-mask-image: var(--hero-user);
  mask-image: var(--hero-user);
}

.hero-key {
  --hero-key: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6.75a5.25 5.25 0 1 0-4.95 6.986L9 15.536V18h2.464l1.8-1.8h2.486v-2.486l1.05-1.05a5.232 5.232 0 0 0-1.05-5.914ZM17.25 6.75h.008v.008h-.008V6.75Z"/></svg>');
  -webkit-mask-image: var(--hero-key);
  mask-image: var(--hero-key);
}

.hero-arrow-path {
  --hero-arrow-path: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992V4.356M2.985 19.644v-4.992h4.992m12.008-5.304A8.96 8.96 0 0 0 12 4.5a8.96 8.96 0 0 0-7.997 4.85m-.018 5.302A8.96 8.96 0 0 0 12 19.5a8.96 8.96 0 0 0 7.997-4.85"/></svg>');
  -webkit-mask-image: var(--hero-arrow-path);
  mask-image: var(--hero-arrow-path);
}

.hero-command-line {
  --hero-command-line: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 7.5h13.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Z"/></svg>');
  -webkit-mask-image: var(--hero-command-line);
  mask-image: var(--hero-command-line);
}

.hero-arrows-right-left {
  --hero-arrows-right-left: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"/></svg>');
  -webkit-mask-image: var(--hero-arrows-right-left);
  mask-image: var(--hero-arrows-right-left);
}

.hero-finger-print {
  --hero-finger-print: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 11.25a2.25 2.25 0 0 0-2.25 2.25c0 1.864-.523 3.607-1.43 5.09M12 11.25a2.25 2.25 0 0 1 2.25 2.25c0 2.34-.487 4.567-1.365 6.585M12 11.25V9m-6.364 9.364A9 9 0 0 0 7.5 13.5a4.5 4.5 0 0 1 9 0c0 2.484-.504 4.85-1.415 7M3.75 13.5a8.25 8.25 0 0 1 16.5 0c0 1.466-.13 2.902-.38 4.296M5.25 8.25A8.25 8.25 0 0 1 18 6"/></svg>');
  -webkit-mask-image: var(--hero-finger-print);
  mask-image: var(--hero-finger-print);
}

.hero-magnifying-glass {
  --hero-magnifying-glass: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m21 21-4.35-4.35m0 0A7.5 7.5 0 1 0 6.04 6.04a7.5 7.5 0 0 0 10.61 10.61Z"/></svg>');
  -webkit-mask-image: var(--hero-magnifying-glass);
  mask-image: var(--hero-magnifying-glass);
}

.hero-share {
  --hero-share: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186 9.566-5.064m-9.566 7.25 9.566 5.064m0-12.314a2.25 2.25 0 1 0 2.1-3.977 2.25 2.25 0 0 0-2.1 3.977Zm0 12.314a2.25 2.25 0 1 0 2.1 3.977 2.25 2.25 0 0 0-2.1-3.977Z"/></svg>');
  -webkit-mask-image: var(--hero-share);
  mask-image: var(--hero-share);
}

.hero-document-text {
  --hero-document-text: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5A3.375 3.375 0 0 0 10.125 2.25H8.25m0 12h7.5m-7.5 3h7.5m-7.5-6H12m-7.5 9.75h15a1.5 1.5 0 0 0 1.5-1.5V11.36a3 3 0 0 0-.879-2.121l-6.36-6.36A3 3 0 0 0 11.64 2H4.5A1.5 1.5 0 0 0 3 3.5v16A1.5 1.5 0 0 0 4.5 21Z"/></svg>');
  -webkit-mask-image: var(--hero-document-text);
  mask-image: var(--hero-document-text);
}

.hero-moon {
  --hero-moon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.752 15.002A9.718 9.718 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"/></svg>');
  -webkit-mask-image: var(--hero-moon);
  mask-image: var(--hero-moon);
}

.hero-sun {
  --hero-sun: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"/></svg>');
  -webkit-mask-image: var(--hero-sun);
  mask-image: var(--hero-sun);
}

.hero-arrow-right-start-on-rectangle {
  --hero-arrow-right-start-on-rectangle: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6A2.25 2.25 0 0 0 5.25 5.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3-3H9m0 0 3-3m-3 3 3 3"/></svg>');
  -webkit-mask-image: var(--hero-arrow-right-start-on-rectangle);
  mask-image: var(--hero-arrow-right-start-on-rectangle);
}

.hero-chevron-left {
  --hero-chevron-left: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m15.75 19.5-7.5-7.5 7.5-7.5"/></svg>');
  -webkit-mask-image: var(--hero-chevron-left);
  mask-image: var(--hero-chevron-left);
}

.hero-chevron-right {
  --hero-chevron-right: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5"/></svg>');
  -webkit-mask-image: var(--hero-chevron-right);
  mask-image: var(--hero-chevron-right);
}

.hero-check-circle {
  --hero-check-circle: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/></svg>');
  -webkit-mask-image: var(--hero-check-circle);
  mask-image: var(--hero-check-circle);
}

.hero-arrow-right-circle {
  --hero-arrow-right-circle: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m16.5 12-4.5-4.5m4.5 4.5-4.5 4.5m4.5-4.5H3m18 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/></svg>');
  -webkit-mask-image: var(--hero-arrow-right-circle);
  mask-image: var(--hero-arrow-right-circle);
}

.hero-plus {
  --hero-plus: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>');
  -webkit-mask-image: var(--hero-plus);
  mask-image: var(--hero-plus);
}

.hero-x-mark-solid {
  --hero-x-mark-solid: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd"/></svg>');
  -webkit-mask-image: var(--hero-x-mark-solid);
  mask-image: var(--hero-x-mark-solid);
}

.hero-network {
  --hero-network: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><circle cx="12" cy="4.75" r="2.5"/><circle cx="5" cy="18.25" r="2.5"/><circle cx="19" cy="18.25" r="2.5"/><path stroke-linecap="round" d="m10.65 7-4.3 8.9M13.35 7l4.3 8.9M7.5 18.25h9"/></svg>');
  -webkit-mask-image: var(--hero-network);
  mask-image: var(--hero-network);
}

.hero-pause {
  --hero-pause: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><rect x="5" y="3.5" width="5" height="17" rx="1.5"/><rect x="14" y="3.5" width="5" height="17" rx="1.5"/></svg>');
  -webkit-mask-image: var(--hero-pause);
  mask-image: var(--hero-pause);
}

.hero-stop {
  --hero-stop: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><rect x="4" y="4" width="16" height="16" rx="2.5"/></svg>');
  -webkit-mask-image: var(--hero-stop);
  mask-image: var(--hero-stop);
}

.hero-arrow-left {
  --hero-arrow-left: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"/></svg>');
  -webkit-mask-image: var(--hero-arrow-left);
  mask-image: var(--hero-arrow-left);
}

.hero-arrow-up-right {
  --hero-arrow-up-right: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H18m0 0v4.5M18 6 6 18"/></svg>');
  -webkit-mask-image: var(--hero-arrow-up-right);
  mask-image: var(--hero-arrow-up-right);
}

.hero-adjustments-horizontal {
  --hero-adjustments-horizontal: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.6"><path stroke-linecap="round" d="M3.75 6h16.5M3.75 12h16.5M3.75 18h16.5"/><circle cx="8.25" cy="6" r="2" fill="currentColor" stroke="none"/><circle cx="15.75" cy="12" r="2" fill="currentColor" stroke="none"/><circle cx="10.5" cy="18" r="2" fill="currentColor" stroke="none"/></svg>');
  -webkit-mask-image: var(--hero-adjustments-horizontal);
  mask-image: var(--hero-adjustments-horizontal);
}

.hero-archive-box-arrow-down {
  --hero-archive-box-arrow-down: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.6"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 9h16.5m-15 0v9.75A2.25 2.25 0 0 0 7.5 21h9a2.25 2.25 0 0 0 2.25-2.25V9M9 13.5l3 3m0 0 3-3m-3 3V10.5M4.5 3h15l1.5 3H3l1.5-3Z"/></svg>');
  -webkit-mask-image: var(--hero-archive-box-arrow-down);
  mask-image: var(--hero-archive-box-arrow-down);
}

.hero-arrows-up-down {
  --hero-arrows-up-down: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="m7.5 3-3 3m0 0 3 3m-3-3h15m-3 9 3 3m0 0-3 3m3-3h-15"/></svg>');
  -webkit-mask-image: var(--hero-arrows-up-down);
  mask-image: var(--hero-arrows-up-down);
}

.hero-chevron-down {
  --hero-chevron-down: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 8.25 7.5 7.5 7.5-7.5"/></svg>');
  -webkit-mask-image: var(--hero-chevron-down);
  mask-image: var(--hero-chevron-down);
}

.hero-chevron-up {
  --hero-chevron-up: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 15.75-7.5-7.5-7.5 7.5"/></svg>');
  -webkit-mask-image: var(--hero-chevron-up);
  mask-image: var(--hero-chevron-up);
}

.hero-cube-transparent {
  --hero-cube-transparent: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="m21 7.5-9-5.25L3 7.5m18 0-9 5.25M21 7.5v9L12 21.75m0-9L3 7.5m9 5.25v9M3 7.5v9l9 5.25"/></svg>');
  -webkit-mask-image: var(--hero-cube-transparent);
  mask-image: var(--hero-cube-transparent);
}

.hero-document-duplicate {
  --hero-document-duplicate: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V8.25c0-.621.504-1.125 1.125-1.125H7.5m8.25 10.125h3.375c.621 0 1.125-.504 1.125-1.125V5.603c0-.299-.119-.585-.33-.796l-2.727-2.727a1.125 1.125 0 0 0-.796-.33H9.375c-.621 0-1.125.504-1.125 1.125V7.5m7.5 9.75H9.375A1.125 1.125 0 0 1 8.25 16.125V7.5"/></svg>');
  -webkit-mask-image: var(--hero-document-duplicate);
  mask-image: var(--hero-document-duplicate);
}

.hero-envelope {
  --hero-envelope: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.6"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5A2.25 2.25 0 0 1 19.5 19.5h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0-8.69 5.514a2 2 0 0 1-2.12 0L2.25 6.75"/></svg>');
  -webkit-mask-image: var(--hero-envelope);
  mask-image: var(--hero-envelope);
}

.hero-funnel {
  --hero-funnel: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.6"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.012L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"/></svg>');
  -webkit-mask-image: var(--hero-funnel);
  mask-image: var(--hero-funnel);
}

.hero-information-circle {
  --hero-information-circle: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25 12 10.5m0 0 .75.75M12 10.5v6m9-4.5a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM12 7.5h.008v.008H12V7.5Z"/></svg>');
  -webkit-mask-image: var(--hero-information-circle);
  mask-image: var(--hero-information-circle);
}

.hero-queue-list {
  --hero-queue-list: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.6"><path stroke-linecap="round" d="M6 6.75h12M6 12h12M6 17.25h12"/><circle cx="3" cy="6.75" r=".75" fill="currentColor" stroke="none"/><circle cx="3" cy="12" r=".75" fill="currentColor" stroke="none"/><circle cx="3" cy="17.25" r=".75" fill="currentColor" stroke="none"/></svg>');
  -webkit-mask-image: var(--hero-queue-list);
  mask-image: var(--hero-queue-list);
}

.hero-scale {
  --hero-scale: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.6"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3v18m0-16.5 6.75 2.25M12 4.5 5.25 6.75M5.25 6.75 2.25 12h6L5.25 6.75Zm13.5 0-3 5.25h6l-3-5.25ZM6 21h12"/></svg>');
  -webkit-mask-image: var(--hero-scale);
  mask-image: var(--hero-scale);
}

.hero-shield-check {
  --hero-shield-check: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.6"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75m5.25-4.5c0 7.5-3.75 12.75-8.25 15-4.5-2.25-8.25-7.5-8.25-15A12.1 12.1 0 0 0 12 2.25a12.1 12.1 0 0 0 8.25 3Z"/></svg>');
  -webkit-mask-image: var(--hero-shield-check);
  mask-image: var(--hero-shield-check);
}

.hero-signal {
  --hero-signal: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" d="M4.5 12.75a10.5 10.5 0 0 1 15 0M7.5 15.75a6.3 6.3 0 0 1 9 0M10.5 18.75a2.1 2.1 0 0 1 3 0"/></svg>');
  -webkit-mask-image: var(--hero-signal);
  mask-image: var(--hero-signal);
}

.hero-signal-slash {
  --hero-signal-slash: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7"><path stroke-linecap="round" d="M4.5 12.75a10.5 10.5 0 0 1 4.7-2.7m4.4-.2a10.5 10.5 0 0 1 5.9 2.9M8 15.3a6.3 6.3 0 0 1 4-1.4m3.9 1.7.6.15M10.5 18.75a2.1 2.1 0 0 1 3 0M3 3l18 18"/></svg>');
  -webkit-mask-image: var(--hero-signal-slash);
  mask-image: var(--hero-signal-slash);
}

.hero-squares-2x2 {
  --hero-squares-2x2: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.6"><rect x="3.75" y="3.75" width="6.5" height="6.5" rx="1.25"/><rect x="13.75" y="3.75" width="6.5" height="6.5" rx="1.25"/><rect x="3.75" y="13.75" width="6.5" height="6.5" rx="1.25"/><rect x="13.75" y="13.75" width="6.5" height="6.5" rx="1.25"/></svg>');
  -webkit-mask-image: var(--hero-squares-2x2);
  mask-image: var(--hero-squares-2x2);
}

.hero-x-mark {
  --hero-x-mark: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" d="M6 6l12 12M18 6 6 18"/></svg>');
  -webkit-mask-image: var(--hero-x-mark);
  mask-image: var(--hero-x-mark);
}

@media (max-width: 900px) {
  .proxy-edit-grid {
    grid-template-columns: 1fr;
  }

  .proxy-edit-actions {
    justify-content: flex-start;
  }
}

.scan-meta,
.diagnostic-row {
  gap: 0.8rem;
  margin-top: 0.7rem;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.diagnostic-row strong {
  color: var(--text);
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 36px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.48rem 0.78rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

button:hover,
.btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--panel-3);
}

button.primary,
.btn.primary {
  color: #17130f;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

button.danger,
.btn.danger {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th {
  color: var(--text-dim);
  padding: 0.58rem 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 850;
  text-align: left;
}

td {
  padding: 0.62rem 0.65rem;
  border-bottom: 1px solid var(--border);
}

tr:hover td {
  background: var(--panel-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.52rem;
  font-size: 0.7rem;
  font-weight: 850;
}

.pill.green {
  color: var(--cpa);
  background: var(--ag-ok-bg);
  border: 1px solid var(--ag-ok-border);
}

.pill.red {
  color: var(--danger);
  background: var(--ag-danger-bg);
  border: 1px solid var(--ag-danger-border);
}

.pill.yellow {
  color: var(--accent-2);
  background: var(--ag-warning-bg);
  border: 1px solid var(--ag-warning-border);
}

.pill.blue,
.pill.gray {
  color: var(--accent);
  background: var(--ag-info-bg);
  border: 1px solid var(--ag-info-border);
}

.stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.05rem 1.25rem;
  padding: 0.15rem 0 0.95rem;
}

.stat {
  min-width: 88px;
}

.stat .num {
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.stat .label {
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 850;
}

.stat.cracked .num,
.text-green {
  color: var(--cpa);
}

.stat.banned .num,
.text-red {
  color: var(--danger);
}

.stat.remaining .num,
.text-yellow {
  color: var(--accent-2);
}

.stat.progress .num,
.text-blue {
  color: var(--accent);
}

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

.progress-bar {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-2);
}

.progress-bar .fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 260ms ease;
}

.stage-progress-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.stage-progress-lane {
  min-width: 0;
  padding: 0.54rem 0.62rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(250, 249, 245, 0.025);
}

.stage-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 850;
}

.stage-progress-head span {
  min-width: 0;
}

.stage-progress-title {
  display: grid;
  gap: 0.18rem;
}

.stage-progress-title small {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.24rem;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
}

.stage-progress-title small .ag-icon {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
}

.stage-progress-head strong {
  color: var(--text);
  font-size: 0.72rem;
}

.stage-progress-head em {
  margin-left: 0.32rem;
  color: var(--text-muted);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0;
}

.stage-progress-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(250, 249, 245, 0.08);
  border-radius: 999px;
  background: rgba(250, 249, 245, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

.stage-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent, #d97757), var(--accent-2, #e5b06e));
  box-shadow:
    0 0 14px rgba(230, 126, 86, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: width 260ms ease;
  will-change: width;
}

.stage-progress-fill.has-progress {
  min-width: 6px;
}

.stage-progress-lane.is-running {
  border-color: var(--ag-ok-border);
  background: rgba(143, 190, 149, 0.06);
}

.stage-progress-lane.is-running .stage-progress-fill {
  background: linear-gradient(90deg, var(--cpa, #8fbe95), var(--accent-2, #e5b06e));
}

.stage-progress-lane.is-waiting-retry,
.stage-progress-lane.is-stopped {
  border-color: var(--ag-warning-border);
  background: rgba(229, 176, 110, 0.06);
}

.stage-progress-lane.is-done .stage-progress-fill {
  background: linear-gradient(90deg, var(--cpa, #8fbe95), var(--accent, #d97757));
  box-shadow: 0 0 14px rgba(143, 190, 149, 0.34);
}

.stage-progress-lane.is-failed {
  border-color: var(--ag-danger-border);
}

.stage-progress-lane.is-failed .stage-progress-fill {
  background: linear-gradient(90deg, var(--danger), var(--accent));
}

.test-progress {
  padding: 0.85rem;
  margin-top: 1rem;
}

.test-progress-mini {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.55rem;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.scroll-list {
  max-height: 500px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.empty-state {
  padding: 2.2rem;
  color: var(--text-dim);
  text-align: center;
}

.empty-state.compact {
  padding: 0.8rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(250, 249, 245, 0.025);
  font-size: 0.76rem;
}

/* Instances page — compact laptop/VPS catalogue (page scroll, no nested cage) */
.instances-page {
  display: grid;
  gap: 0.85rem;
}

.instances-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.instances-filter {
  flex: 1 1 16rem;
  min-width: 12rem;
  max-width: 24rem;
}

.instances-filter input[type="search"] {
  width: 100%;
  min-height: 2.2rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
}

.instances-create-card .instances-create-form {
  display: grid;
  gap: 0.55rem;
}

/* Make edit mode obvious after clicking Edit on a table row (form lives above the table). */
.instances-create-card.is-editing {
  border-color: color-mix(in srgb, var(--accent, #efb66f) 55%, var(--border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent, #efb66f) 35%, transparent),
    0 10px 28px color-mix(in srgb, var(--accent, #efb66f) 12%, transparent);
}

.instances-create-card.is-editing .card-header {
  background: color-mix(in srgb, var(--accent, #efb66f) 10%, transparent);
}

.instances-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}

.instances-create-actions {
  display: flex;
  align-items: end;
  padding-bottom: 0.15rem;
}

.instances-merge-bar {
  flex-wrap: wrap;
  gap: 0.65rem;
}

.instances-merge-bar .batch-actions {
  max-width: none;
}

.instances-merge-bar .batch-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.instances-table-card > table.instances-table,
.instances-table-card form > table.instances-table {
  width: 100%;
  border-collapse: collapse;
}

.instances-table th,
.instances-table td {
  padding: 0.42rem 0.55rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  vertical-align: middle;
}

.instances-table th {
  color: var(--text-muted);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.instances-table tbody tr:hover {
  background: rgba(250, 249, 245, 0.03);
}

.instances-table-card .card-header {
  align-items: flex-start;
  gap: 0.65rem;
}

.instances-table-card .card-header .helper-text {
  margin-top: 0.2rem;
}

/* P0-CRACKED-UX C5: single compact horizontal filter row; page scrolls results */
.cracked-control-bar,
.cracked-control-bar.cracked-control-bar--single-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.cracked-control-search {
  flex: 1 1 14rem;
  min-width: 10rem;
  max-width: 22rem;
}

/* Legacy multi-row grid no longer used on cracked index; keep harmless */
.cracked-control-grid {
  display: contents;
}

.cracked-control-bar .launch-inline-control {
  flex: 0 0 auto;
  min-width: 7.5rem;
  max-width: 11.5rem;
}

.cracked-control-bar .cracked-control-search .launch-inline-control {
  min-width: 0;
  max-width: none;
  width: 100%;
}

.cracked-control-bar .cracked-page-size-control {
  min-width: 6.5rem;
  max-width: 7.5rem;
}

.cracked-control-bar .launch-inline-control input,
.cracked-control-bar .launch-inline-control select {
  width: 100%;
  min-height: 2rem;
  padding: 0.28rem 0.42rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.74rem;
}

.cracked-control-bar .launch-inline-control input[type="search"]::-webkit-search-cancel-button {
  filter: invert(1) opacity(0.65);
}

/* Full-page results: no nested max-height scroll cage */
.cracked-results-panel {
  width: 100%;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.cracked-results-table {
  width: 100%;
  border-collapse: collapse;
}

.cracked-results-table th,
.cracked-results-table td {
  padding: 0.32rem 0.48rem;
  vertical-align: middle;
  font-size: 0.74rem;
  line-height: 1.25;
}

.cracked-results-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel, var(--bg-elevated, #141414));
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted, var(--text-dim));
}

.cracked-results-table tbody tr + tr td {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.cracked-results-table tbody tr:hover td {
  background: rgba(250, 249, 245, 0.03);
}

.cracked-cell-url,
.cracked-cell-password {
  font-size: 0.74rem;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cracked-cell-password {
  color: var(--cpa);
}

.cracked-cell-scan,
.cracked-cell-found {
  font-size: 0.72rem;
  color: var(--text-muted, var(--text-dim));
  white-space: nowrap;
}

.cracked-cell-scan {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cracked-status-cell {
  min-width: 7.5rem;
  white-space: nowrap;
}

.cracked-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  box-shadow: none;
}

.cracked-table-sort:hover,
.cracked-table-sort.is-active {
  color: var(--cpa);
}

.cracked-table-sort .ag-icon {
  width: 0.72rem;
  height: 0.72rem;
  opacity: 0.74;
}

.cracked-found-time {
  display: inline-flex;
  white-space: nowrap;
  cursor: help;
}

.cracked-results-table .cracked-badge-stack {
  gap: 0.18rem;
}

.cracked-results-table .cracked-icon-badge,
.cracked-results-table .cracked-status-badge {
  min-height: 1.35rem;
  padding: 0.1rem 0.32rem;
  font-size: 0.68rem;
}

.cracked-badge-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cracked-icon-badge,
.cracked-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  min-height: 1.72rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.cracked-icon-badge {
  min-width: 2.5rem;
  padding: 0 0.55rem;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.cracked-status-badge {
  max-width: 9.5rem;
  padding: 0 0.62rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cracked-status-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cracked-icon-badge .ag-icon,
.cracked-status-badge .ag-icon {
  width: 0.86rem;
  height: 0.86rem;
  flex: 0 0 auto;
}

.cracked-status-badge.green {
  color: var(--cpa);
  background: var(--ag-ok-bg);
  border: 1px solid var(--ag-ok-border);
}

.cracked-status-badge.red {
  color: var(--danger);
  background: var(--ag-danger-bg);
  border: 1px solid var(--ag-danger-border);
}

.cracked-status-badge.yellow {
  color: var(--accent-2);
  background: var(--ag-warning-bg);
  border: 1px solid var(--ag-warning-border);
}

.cracked-status-badge.blue,
.cracked-status-badge.gray {
  color: var(--accent);
  background: var(--ag-info-bg);
  border: 1px solid var(--ag-info-border);
}

.cracked-show-card {
  max-width: 1180px;
  margin: 0 auto;
}

.cracked-show-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(11rem, 0.85fr) minmax(12rem, 0.9fr);
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.cracked-show-field {
  min-width: 0;
  padding: 0.74rem 0.82rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.cracked-show-field span {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.cracked-show-field strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
}

.cracked-detail-panel {
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid rgba(217, 119, 87, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(217, 119, 87, 0.08), rgba(250, 249, 245, 0.025)),
    var(--panel);
}

.cracked-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.45rem;
}

.cracked-model-section,
.cracked-api-section {
  padding: 0.78rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.cracked-model-head,
.cracked-api-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.cracked-model-head h3,
.cracked-api-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.cracked-model-head p,
.cracked-model-note,
.cracked-api-head span {
  margin: 0.18rem 0 0;
  color: var(--text-dim);
  font-size: 0.7rem;
  line-height: 1.35;
}

.cracked-model-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.cracked-model-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(217, 119, 87, 0.18);
  border-radius: 10px;
  background: rgba(217, 119, 87, 0.05);
}

.cracked-model-stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

.cracked-model-stat-value.pill {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
}

.cracked-model-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cracked-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.42rem;
}

.cracked-model-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.48rem 0.56rem;
  color: var(--text);
  border: 1px solid rgba(217, 119, 87, 0.24);
  border-radius: 8px;
  background: rgba(217, 119, 87, 0.08);
  font-family: "SF Mono", "Cascadia Code", "Fira Code", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 750;
}

.cracked-model-chip .ag-icon {
  width: 0.86rem;
  height: 0.86rem;
  color: var(--accent);
}

.cracked-model-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cracked-api-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

@media (max-width: 900px) {
  .cracked-show-hero {
    grid-template-columns: 1fr;
  }
}

.mono {
  font-family: "SF Mono", "Cascadia Code", "Fira Code", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-2 {
  margin-top: 0.5rem;
}

.items-center {
  align-items: center;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.ag-flash-stack {
  margin-bottom: 1rem;
}

.ag-flash-stack:empty {
  display: none;
}

.flash-info,
.flash-error {
  border-radius: 8px;
  padding: 0.72rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  font-weight: 750;
}

.flash-info {
  color: var(--accent);
  background: var(--ag-info-bg);
  border: 1px solid var(--ag-info-border);
}

.flash-error {
  color: var(--danger);
  background: var(--ag-danger-bg);
  border: 1px solid var(--ag-danger-border);
}

.helper-text {
  color: var(--text-dim);
  font-size: 0.76rem;
  margin-top: 0.42rem;
}

.helper-text.warning {
  color: var(--accent);
}

.scanner-launch-panel {
  margin-bottom: 1rem;
  padding: 0.62rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)), var(--panel);
  box-shadow: var(--shadow);
}

.scanner-launch-head,
.launch-health,
.launch-forecast,
.stage-row,
.stage-toggle {
  display: flex;
  align-items: center;
}

.scanner-launch-head {
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.62rem;
  border-bottom: 1px solid var(--border);
}

.scanner-launch-head h1 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
}

.scanner-launch-head p {
  display: none;
  margin: 0.22rem 0 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.launch-health {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.launch-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.62rem;
}

.launch-summary-strip span {
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.48rem;
  font-size: 0.68rem;
}

.launch-summary-strip strong {
  color: var(--text);
  margin-left: 0.2rem;
}

.runtime-strip {
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.runtime-strip span {
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.62rem;
  font-size: 0.76rem;
}

.runtime-strip strong {
  color: var(--text);
  margin-left: 0.24rem;
}

.scanner-form-section {
  border-top: 0;
  padding-top: 0;
  margin-top: 0.48rem;
}

.scanner-form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.scanner-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.56rem;
}

.scanner-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
}

.scanner-section-head p {
  display: none;
  margin: 0.18rem 0 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.scanner-launch-panel .form-group {
  margin-bottom: 0;
}

.scanner-launch-panel label {
  margin-bottom: 0.28rem;
  font-size: 0.68rem;
}

.scanner-launch-panel label.sr-only {
  margin: -1px !important;
  font-size: inherit;
}

.scanner-launch-panel .helper-text:not(.warning) {
  display: none;
}

.scanner-launch-panel input[type="text"],
.scanner-launch-panel input[type="number"],
.scanner-launch-panel textarea,
.scanner-launch-panel select {
  padding: 0.42rem 0.54rem;
}

.scanner-launch-panel select {
  min-height: 2.2rem;
}

.scanner-custom-grid,
.launch-control-grid,
.scanner-run-grid,
.scan-source-strip {
  display: grid;
  gap: 1.1rem;
}

.launch-control-grid {
  grid-template-columns:
    minmax(220px, 1.35fr)
    minmax(180px, 1fr)
    minmax(92px, 0.42fr)
    minmax(112px, 0.5fr)
    minmax(96px, 0.42fr);
  align-items: end;
  gap: 0.65rem;
}

.launch-control-item {
  min-width: 0;
}

.launch-inline-control {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr);
  min-height: 2.28rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.launch-inline-control:focus-within {
  border-color: var(--accent);
  background: var(--panel-3);
  box-shadow: 0 0 0 2px rgba(230, 126, 86, 0.12);
}

.proxy-select-control {
  grid-template-columns: 2.15rem auto minmax(0, 1fr);
}

.proxy-enable-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 2.26rem;
  margin: 0 !important;
  padding: 0 0.48rem;
  color: var(--accent);
  background: rgba(230, 126, 86, 0.08);
  border-right: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.62rem !important;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.proxy-enable-toggle input[type="checkbox"] {
  width: 0.82rem;
  height: 0.82rem;
  margin: 0;
  accent-color: var(--accent);
}

.proxy-select-control.proxy-disabled .proxy-enable-toggle {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.025);
}

.proxy-select-control.proxy-disabled select,
.launch-inline-control.proxy-disabled input[name="proxy_limit"] {
  color: var(--text-dim);
  opacity: 0.68;
}

.launch-control-icon {
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(230, 126, 86, 0.08);
  border-right: 1px solid var(--border);
}

.launch-control-icon .ag-icon {
  width: 0.92rem;
  height: 0.92rem;
}

.scanner-launch-panel .launch-inline-control input[type="text"],
.scanner-launch-panel .launch-inline-control input[type="number"],
.scanner-launch-panel .launch-inline-control select {
  width: 100%;
  min-height: 2.26rem;
  padding: 0.34rem 0.52rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.scanner-custom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scanner-custom-grid.single {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0.55rem;
}

.scanner-run-grid {
  grid-template-columns: minmax(220px, 1.25fr) minmax(220px, 1.1fr) minmax(150px, 0.75fr) minmax(170px, 0.75fr) minmax(150px, 0.65fr);
  align-items: start;
}

.scanner-run-grid.staged {
  grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 0.7fr) minmax(180px, 0.8fr) minmax(150px, 0.65fr);
}

.stage-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.34rem;
}

.stage-launch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(4.8rem, auto);
  gap: 0.5rem;
  align-items: stretch;
}

.stage-start-button {
  min-height: 100%;
  padding-inline: 1rem;
  white-space: nowrap;
}

.stage-start-button.icon-command {
  display: inline-grid;
  min-width: 3.1rem;
  place-items: center;
  padding-inline: 0.85rem;
}

.stage-start-button.icon-command .ag-icon {
  width: 1.08rem;
  height: 1.08rem;
}

.stage-row {
  display: grid;
  grid-template-columns: 1.38rem minmax(0, 0.9fr) minmax(5.8rem, 1.15fr) auto;
  min-height: 0;
  align-items: center;
  gap: 0.3rem;
  padding: 0.34rem 0.42rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.stage-row.has-toggle {
  grid-template-columns:
    1.38rem minmax(0, 0.8fr) minmax(3.75rem, auto) minmax(5.8rem, 1.15fr)
    auto;
}

.stage-row.disabled {
  opacity: 0.62;
}

.stage-number {
  display: grid;
  width: 1.42rem;
  height: 1.42rem;
  place-items: center;
  border: 1px solid var(--ag-orange-border);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(230, 126, 86, 0.11);
  font-size: 0.7rem;
  font-weight: 900;
}

.stage-copy {
  min-width: 0;
}

.stage-title-line {
  display: flex;
  align-items: center;
  gap: 0.34rem;
  min-width: 0;
}

.stage-title-line strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-title-line small {
  display: none;
}

.stage-copy span {
  display: none;
  margin-top: 0.18rem;
  color: var(--text-dim);
  font-size: 0.74rem;
  line-height: 1.35;
}

.stage-mode,
.stage-toggle {
  display: inline-flex;
  align-items: center;
  min-width: 3.75rem;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.24rem 0.38rem;
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-mode {
  display: none;
}

.stage-mode.direct {
  color: var(--cpa);
  background: rgba(126, 184, 139, 0.1);
  border-color: rgba(126, 184, 139, 0.3);
}

.stage-mode.proxy,
.stage-toggle {
  color: var(--accent);
  background: rgba(230, 126, 86, 0.09);
  border-color: var(--ag-orange-border);
}

.stage-toggle {
  gap: 0.3rem;
  cursor: pointer;
  text-transform: none;
}

.stage-toggle input[type="checkbox"] {
  width: 0.82rem;
  height: 0.82rem;
  accent-color: var(--accent);
}

.form-group.compact {
  grid-column: 3;
  min-width: 0;
}

.stage-row .form-group.compact label {
  display: none;
}

.stage-row .form-group.compact select {
  min-height: 1.75rem;
  padding: 0.2rem 1.55rem 0.2rem 0.42rem;
  font-size: 0.72rem;
}

.stage-estimate {
  grid-column: 4;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.18rem;
  white-space: nowrap;
}

.stage-estimate strong,
.stage-estimate span {
  display: inline;
}

.stage-estimate strong {
  color: var(--text);
  font-size: 0.74rem;
}

.stage-estimate span {
  color: var(--text-dim);
  font-size: 0.52rem;
  font-weight: 850;
}

.stage-row.disabled .stage-toggle {
  grid-column: 3;
}

.stage-row.has-toggle .stage-toggle {
  grid-column: 3;
  justify-self: start;
}

.stage-row.has-toggle .form-group.compact {
  grid-column: 4;
}

.stage-row.has-toggle .stage-estimate {
  grid-column: 5;
}

.stage-custom {
  padding-left: 0;
}

.stage-custom textarea {
  min-height: 84px;
}

.ssh-credential-section {
  margin-top: 0.5rem;
}

.ssh-credential-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(4.8rem, auto);
  gap: 0.5rem;
  align-items: stretch;
}

.ssh-credential-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(7.2rem, auto) minmax(220px, 1fr);
  gap: 0.5rem;
  align-items: stretch;
}

.scanner-launch-panel .launch-inline-control textarea {
  width: 100%;
  min-height: 2.26rem;
  max-height: 7rem;
  padding: 0.48rem 0.52rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: vertical;
  line-height: 1.25;
}

.ssh-inline-toggle {
  min-height: 2.28rem;
  width: 100%;
  border-radius: 8px;
  justify-self: stretch;
  text-transform: none;
}

.ssh-custom-passwords {
  margin-top: 0.55rem;
}

.ssh-custom-passwords textarea {
  min-height: 84px;
}

.ssh-scan-launch-grid {
  grid-template-columns:
    minmax(150px, 0.75fr)
    minmax(260px, 1.3fr)
    minmax(120px, 0.48fr)
    minmax(116px, 0.48fr)
    minmax(106px, 0.44fr)
    minmax(4.8rem, auto);
}

.ssh-scan-three-col {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  gap: 0.65rem;
  align-items: stretch;
}

.ssh-scan-config-column {
  grid-column: 2 / 4;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.55rem;
  min-width: 0;
}

.ssh-scan-config-grid {
  display: grid;
  grid-template-columns:
    minmax(160px, 1fr)
    minmax(90px, 0.48fr)
    minmax(110px, 0.52fr)
    minmax(96px, 0.48fr);
  gap: 0.55rem;
  align-items: stretch;
}

.ssh-scan-three-col .launch-control-item {
  margin: 0;
}

.ssh-ranges-control {
  height: 100%;
  min-height: 5.8rem;
}

.ssh-scan-launch-grid .launch-inline-control textarea {
  min-height: 2.26rem;
  max-height: 5rem;
}

.ssh-ranges-control textarea {
  min-height: 5.8rem;
  max-height: none;
}

.ssh-scan-summary-strip {
  align-items: center;
  align-content: start;
  justify-content: space-between;
  margin-top: 0;
}

.ssh-scan-summary-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
  min-width: 0;
}

.ssh-scan-card {
  border-left: 2px solid rgba(217, 119, 87, 0.42);
}

.ssh-scan-card.completed {
  border-left-color: rgba(126, 184, 139, 0.44);
}

.ssh-open-preview {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.ssh-open-preview .scroll-list {
  max-height: 220px;
}

.launch-forecast {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.launch-forecast span {
  color: var(--text-dim);
  font-size: 0.76rem;
}

.launch-forecast strong {
  color: var(--text);
  margin-right: 0.2rem;
}

.scan-source-strip {
  grid-template-columns: minmax(140px, 0.72fr) minmax(260px, 1.56fr) minmax(140px, 0.72fr);
  margin: 1.1rem 0 1.25rem;
}

.scan-source-strip > span,
.scanner-stage-batch {
  min-width: 0;
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.72rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.28;
}

.scan-source-item,
.scanner-stage-batch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.48rem;
}

.scan-source-item.compact-source {
  display: inline-grid;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.scan-source-item .ag-icon,
.scanner-stage-batch .ag-icon {
  width: 0.92rem;
  height: 0.92rem;
  color: var(--accent);
}

.scanner-stage-batches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.42rem;
  min-width: 0;
}

.scanner-stage-batch {
  padding: 0.58rem 0.62rem;
}

.scanner-stage-batch.is-stage_1 .ag-icon {
  color: var(--cpa);
}

.scanner-stage-batch.is-muted {
  opacity: 0.68;
}

.scanner-stage-batch-copy {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.scanner-stage-batch em {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.scanner-stage-batch small {
  overflow: hidden;
  color: var(--text-dim);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-source-strip > span strong,
.scanner-stage-batch strong {
  display: block;
  overflow: hidden;
  margin-top: 0.22rem;
  color: var(--text);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-source-item strong {
  margin-top: 0;
}

.scan-card {
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.scan-card-head {
  align-items: flex-start;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.scan-title {
  gap: 0.55rem;
  row-gap: 0.45rem;
  min-width: 0;
}

.scan-title .mono {
  max-width: min(100%, 18rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-row {
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.form-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.launch-grid,
.run-controls {
  display: grid;
  gap: 1rem;
}

.launch-grid {
  grid-template-columns: minmax(260px, 1.15fr) minmax(220px, 0.85fr);
}

.run-controls {
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 160px) minmax(120px, 160px);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.auth-card {
  width: min(380px, 100%);
  margin-bottom: 0;
}

.auth-card button {
  width: 100%;
}

@media (max-width: 1100px) {
  .ag-topbar,
  .ag-nav-left,
  .ag-nav-right {
    align-items: center;
  }

  .ag-topbar {
    flex-direction: row;
  }

  .ag-nav-left {
    width: auto;
    flex: 1 1 auto;
  }

  .ag-nav-right {
    width: auto;
  }

  .ag-tabs {
    width: auto;
    margin-left: 0.25rem;
  }

  .cracked-control-bar,
  .cracked-control-bar.cracked-control-bar--single-row {
    flex-wrap: nowrap;
  }

  .cracked-control-search {
    flex: 0 0 12rem;
    max-width: 14rem;
  }
}

@media (max-width: 760px) {
  .ag-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ag-nav-left,
  .ag-nav-right {
    width: 100%;
  }

  .ag-brand-name {
    display: none;
  }

  .ag-tabs {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .ag-nav-right {
    justify-content: flex-end;
    overflow-x: auto;
  }
}

@media (max-width: 900px) {
  .ag-page {
    padding: 1rem;
  }

  .ag-page-netscan {
    padding: 0;
  }

  .grid-2,
  .launch-grid,
  .launch-control-grid,
  .run-controls,
  .scanner-custom-grid,
  .scanner-run-grid,
  .scanner-run-grid.staged,
  .stage-plan,
  .stage-launch-row,
  .ssh-scan-three-col,
  .ssh-scan-config-grid,
  .ssh-credential-row,
  .ssh-credential-fields,
  .stage-progress-pair,
  .scan-source-strip {
    grid-template-columns: 1fr;
  }

  .ssh-scan-config-column {
    grid-column: auto;
  }

  .form-row,
  .card-header,
  .scan-card-head,
  .form-actions,
  .ag-monitor-title,
  .scanner-launch-head,
  .stage-row,
  .launch-forecast {
    align-items: stretch;
    flex-direction: column;
  }

  .stage-mode,
  .stage-toggle,
  .stage-estimate,
  .form-group.compact {
    flex-basis: auto;
    min-width: 0;
    width: 100%;
    text-align: left;
  }

  .stage-row {
    grid-template-columns: 1.42rem minmax(0, 1fr) auto;
  }

  .stage-row.has-toggle {
    grid-template-columns: 1.42rem minmax(0, 1fr) auto;
  }

  .stage-mode,
  .stage-toggle {
    width: auto;
    justify-self: end;
  }

  .form-group.compact {
    grid-column: 1 / -1;
  }

  .stage-row.has-toggle .form-group.compact {
    grid-column: 1 / -1;
  }

  .stage-estimate {
    grid-column: 1 / -1;
    width: auto;
    justify-content: flex-start;
  }

  .stage-row.has-toggle .stage-estimate {
    grid-column: 1 / -1;
  }

  .stage-custom {
    padding-left: 0;
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scan-actions {
    justify-content: stretch;
  }
}

@media (max-width: 680px) {
  .cracked-control-bar,
  .cracked-control-bar.cracked-control-bar--single-row {
    gap: 0.32rem;
  }

  .cracked-control-search {
    flex: 0 0 10rem;
    max-width: 12rem;
  }

  .cracked-control-bar .launch-inline-control {
    min-width: 6.75rem;
  }
}
.ag-server-switcher select {
  min-width: 150px;
  max-width: 220px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background-color: transparent;
  color: var(--text);
  padding: 0 26px 0 7px;
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.ag-server-switcher select:hover {
  background-color: var(--surface-raised);
}

.ns-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ns-form-grid .ns-field {
  display: grid;
  gap: 6px;
}

.ns-form-grid .ns-field textarea {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ns-form-grid .ns-callout,
.ns-form-grid > button,
.ns-form-grid .ns-form-actions {
  grid-column: 1 / -1;
}

.server-intro-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.42fr);
  gap: 1.25rem;
  align-items: end;
}

.server-intro-copy {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.server-intro-icon,
.server-form-section-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent-2);
  background: var(--ag-info-bg);
  border: 1px solid var(--ag-info-border);
}

.server-intro-icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 11px;
}

.server-intro-icon .ag-icon {
  width: 1.3rem;
  height: 1.3rem;
}

.server-intro h1 {
  margin: 0.15rem 0 0.3rem;
  color: var(--text);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
  text-wrap: balance;
}

.server-intro p {
  max-width: 62ch;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.55;
}

.server-intro-note {
  display: grid;
  gap: 0.22rem;
  padding: 0.8rem 0.9rem;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(217, 119, 87, 0.1), transparent);
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.35;
}

.server-intro-note strong {
  color: var(--text);
  font-size: 0.8rem;
}

.server-intro-note-label,
.server-section-heading .eyebrow {
  color: var(--accent-2);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.provisioning-console {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  padding: 1rem;
  background: color-mix(in srgb, var(--panel-2) 88%, #080706);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: inset 3px 0 0 var(--text-muted);
}

.provisioning-console.is-running {
  border-color: var(--ag-info-border);
  box-shadow: inset 3px 0 0 var(--accent-2);
}

.provisioning-console.is-failed {
  border-color: var(--ag-danger-border);
  box-shadow: inset 3px 0 0 var(--danger);
}

.provisioning-console.is-complete {
  border-color: var(--ag-ok-border);
  box-shadow: inset 3px 0 0 var(--cpa);
}

.provisioning-console-head,
.provisioning-console-actions,
.provisioning-live-log summary {
  display: flex;
  align-items: center;
}

.provisioning-console-head {
  justify-content: space-between;
  gap: 1rem;
}

.provisioning-console-head h2 {
  margin: 0.15rem 0 0;
  color: var(--text);
  font-size: 1rem;
}

.provisioning-console-head p {
  margin: 0.22rem 0 0;
  color: var(--text-dim);
  font-size: 0.73rem;
}

.provisioning-console-head p strong {
  color: var(--accent-2);
  text-transform: capitalize;
}

.provisioning-console-actions {
  flex: 0 0 auto;
  gap: 0.45rem;
}

.provisioning-console-actions .ag-icon {
  width: 0.86rem;
  height: 0.86rem;
}

.provisioning-phase-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
}

.provisioning-phase {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.48rem 0.52rem;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.provisioning-phase > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.provisioning-phase .ag-icon {
  width: 0.75rem;
  height: 0.75rem;
}

.provisioning-phase strong {
  overflow: hidden;
  font-size: 0.64rem;
  text-overflow: ellipsis;
}

.provisioning-phase.is-current {
  color: var(--accent-2);
  background: var(--ag-info-bg);
  border-color: var(--ag-info-border);
}

.provisioning-phase.is-complete {
  color: var(--cpa);
  background: var(--ag-ok-bg);
  border-color: var(--ag-ok-border);
}

.provisioning-phase.is-failed {
  color: var(--danger);
  background: var(--ag-danger-bg);
  border-color: var(--ag-danger-border);
}

.provisioning-progress {
  height: 0.25rem;
  overflow: hidden;
  background: var(--border);
  border-radius: 99px;
}

.provisioning-progress span {
  display: block;
  height: 100%;
  background: var(--accent-2);
  border-radius: inherit;
  transition: width 220ms ease;
}

.provisioning-live-log {
  overflow: hidden;
  background: #0d0c0b;
  border: 1px solid color-mix(in srgb, var(--border) 82%, #000);
  border-radius: 8px;
}

.provisioning-live-log summary {
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
}

.provisioning-live-log summary small {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
}

.provisioning-live-log pre {
  max-height: 22rem;
  overflow: auto;
  margin: 0;
  padding: 0.8rem;
  color: #c5beb4;
  border-top: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.65rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.provisioning-background-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.66rem;
}

.server-provision-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.24fr) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
  margin-top: 1.1rem;
}

.server-step-rail {
  position: sticky;
  top: 5rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.server-step {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  padding: 0.62rem;
  color: var(--text-muted);
  border-radius: 8px;
}

.server-step > span {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.62rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.server-step div {
  display: grid;
  gap: 0.04rem;
}

.server-step strong {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.server-step small {
  font-size: 0.62rem;
}

.server-step.is-current {
  color: var(--accent-2);
  background: var(--ag-info-bg);
}

.server-step.is-current strong {
  color: var(--text);
}

.server-step.is-current > span {
  border-color: var(--ag-info-border);
}

.server-provision-form {
  display: grid;
  gap: 0.9rem;
  scroll-margin-top: 5.2rem;
}

.server-provision-form.is-editing {
  padding: 0.85rem;
  background: color-mix(in srgb, var(--ag-info-bg) 45%, transparent);
  border: 1px solid var(--ag-info-border);
  border-radius: 13px;
}

.server-edit-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  background: var(--ag-info-bg);
  border: 1px solid var(--ag-info-border);
  border-radius: 9px;
}

.server-edit-banner > div {
  display: grid;
  gap: 0.12rem;
}

.server-edit-banner strong {
  color: var(--text);
  font-size: 0.76rem;
}

.server-edit-banner span:not(.server-form-section-icon) {
  color: var(--text-dim);
  font-size: 0.66rem;
  line-height: 1.4;
}

@media (max-width: 820px) {
  .server-edit-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .server-edit-banner > button {
    grid-column: 2;
    justify-self: start;
  }
}

/* Scanner fleet cockpit */
.fleet-resource-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 14px;
  padding: 10px 12px;
  border: 1px solid #3b3730;
  border-radius: 11px;
  background: #211f1b;
}

.fleet-resource-toolbar > p {
  margin: 0;
  color: #948d82;
  font-size: 11px;
}

.resource-scope-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  flex: none;
  gap: 5px;
  padding: 4px;
  border: 1px solid #403b33;
  border-radius: 9px;
  background: #171613;
}

.resource-scope-switch button {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #9f978b;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}

.resource-scope-switch button.active,
.resource-scope-switch button[aria-checked="true"],
.resource-scope-switch button[aria-selected="true"] {
  color: #17120e;
  background: #e3a65f;
}

.proxy-test-fleet-scope {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 9px;
  border: 1px solid #3b3730;
  border-radius: 10px;
  background: #1b1a17;
}

.proxy-test-fleet-scope .resource-scope-switch {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proxy-test-fleet-scope > p {
  margin: 0;
  color: #8f887d;
  font-size: 10px;
  text-align: center;
}

.proxy-test-server-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
}

.proxy-test-server-choice {
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  cursor: pointer;
  border: 1px solid #474138;
  border-radius: 7px;
  color: #d8d2c9;
  background: #24221e;
  font-size: 10px;
  font-weight: 700;
}

.proxy-test-server-choice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proxy-test-server-choice.is-offline {
  cursor: not-allowed;
  opacity: 0.48;
}

.proxy-fleet-test-results {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 9px;
}

.proxy-fleet-test-results > span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid #474138;
  border-radius: 999px;
  color: #aaa298;
  background: #1a1916;
  font-size: 9px;
  font-weight: 700;
}

.proxy-fleet-test-results i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #d9ad71;
}

.proxy-fleet-test-results .succeeded { color: #99c899; border-color: #416443; }
.proxy-fleet-test-results .succeeded i { background: #79be78; }
.proxy-fleet-test-results .failed { color: #ef9680; border-color: #7b4036; }
.proxy-fleet-test-results .failed i { background: #e9735f; }

.cracked-origin-list {
  display: flex;
  max-width: 280px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.cracked-origin-state {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid #514a40;
  border-radius: 7px;
  color: #b8b0a5;
  background: #1a1916;
  font-size: 9px;
}

.cracked-origin-state strong {
  color: #e7b36e;
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cracked-origin-state.is-purged {
  opacity: 0.62;
  border-color: #416443;
}

.cracked-origin-state.is-purged strong { color: #8bc58b; }
.cracked-origin-state.is-purge_failed { border-color: #7b4036; }
.cracked-origin-state.is-purge_failed strong { color: #ef9680; }
.cracked-origin-state.is-purge_pending strong { color: #d9ad71; }

.fleet-resource-operations {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.fleet-resource-operation {
  overflow: hidden;
  border: 1px solid #3b3730;
  border-radius: 9px;
  background: #211f1b;
}

.fleet-resource-operation > header {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
}

.fleet-resource-operation > header strong { color: #ded8cf; font-size: 12px; }
.fleet-resource-operation > header code { color: #817a70; font-size: 10px; }
.fleet-resource-operation > header button {
  min-height: 30px;
  margin-left: auto;
  padding: 0 10px;
  border-color: #6b4930;
  color: #e9b775;
}

.resource-operation-status {
  padding: 3px 6px;
  border: 1px solid #4a443b;
  border-radius: 6px;
  color: #aaa297;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.resource-operation-status.completed { color: #8bc58b; border-color: #416443; }
.resource-operation-status.partial,
.resource-operation-status.failed { color: #ef9680; border-color: #7b4036; }
.resource-operation-status.running { color: #e7b36e; border-color: #6f5530; }

.fleet-resource-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px 10px;
  border-top: 1px solid #37332d;
}

.fleet-resource-targets span {
  padding: 4px 7px;
  border-radius: 6px;
  color: #a49c91;
  background: #191815;
  font-size: 9px;
}

.fleet-resource-targets .succeeded { color: #8bc58b; }
.fleet-resource-targets .failed,
.fleet-resource-targets .mismatched { color: #ef9680; }
.fleet-resource-targets .uploading { color: #e7b36e; }

.sc-shell {
  display: grid;
  gap: 18px;
  padding: 8px;
}

.sc-cockpit,
.sc-runs {
  overflow: hidden;
  border: 1px solid #37332d;
  border-radius: 14px;
  background: #1c1b18;
}

.sc-cockpit-head,
.sc-launch-row,
.sc-runs > header,
.sc-run-row > header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid #37332d;
  background: #22201c;
}

.sc-title,
.sc-runs > header > div,
.sc-run-row > header > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.sc-title span,
.sc-runs header span,
.sc-run-row > header span {
  color: #e8ad67;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.sc-title h1,
.sc-runs h2 {
  margin: 0;
  color: #f2eee8;
  font-size: 25px;
  font-weight: 550;
  letter-spacing: -.03em;
}

.sc-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  margin: 0 0 0 auto;
  border: 1px solid #3d3932;
  border-radius: 10px;
  background: #292720;
}

.sc-totals div {
  min-width: 82px;
  padding: 8px 12px;
  border-left: 1px solid #3d3932;
}

.sc-totals div:first-child { border-left: 0; }
.sc-totals .warning dd { color: #f09a79; }

.sc-totals dt,
.sc-assignment dt {
  color: #8f887d;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sc-totals dd,
.sc-assignment dd {
  margin: 2px 0 0;
  color: #eee9e1;
  font-size: 15px;
  font-weight: 800;
}

.sc-assignment dd .sc-import-debt {
  display: block;
  margin-top: 2px;
  color: #8f887d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.sc-assignment dd .sc-import-debt.is-debt {
  color: #e3a65f;
}

.sc-assignment dd .sc-import-debt.is-rejected {
  color: #c47a6a;
}

.sc-refresh {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border: 1px solid #413c34;
  border-radius: 10px;
  color: #c7bfb4;
  background: #181714;
}

.sc-header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.sc-online-filter {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #413c34;
  border-radius: 10px;
  color: #c7bfb4;
  background: #181714;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.sc-online-filter:hover {
  border-color: #887057;
  color: #f2eee8;
  background: #2c2821;
}

.sc-online-filter.is-active {
  border-color: #9ccc5d;
  color: #181714;
  background: #9ccc5d;
}

.sc-online-filter .ag-icon {
  width: 14px;
  height: 14px;
}

.sc-plan-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 16px;
  color: #e9c497;
  border-bottom: 1px solid #4b3f2d;
  background: #332b20;
  font-size: 12px;
}

.sc-config-layout {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(620px, 2fr);
  gap: 12px;
  padding: 12px;
}

.sc-global-card,
.sc-server-card,
.sc-assignment {
  border: 1px solid #3c3831;
  border-radius: 11px;
  background: #26241f;
}

.sc-global-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 11px;
}

.sc-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr .62fr;
  gap: 8px;
}

.sc-field-grid-primary { grid-template-columns: 1.25fr 1fr; }

.sc-global-card .ns-field,
.sc-server-fields .ns-field,
.sc-manual-count .ns-field {
  margin: 0;
}

.sc-global-card label,
.sc-server-fields label,
.sc-manual-count label {
  font-size: 10px;
}

.sc-global-card input,
.sc-global-card select,
.sc-server-fields input,
.sc-server-fields select,
.sc-manual-count input {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 400;
}

.sc-allocation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sc-allocation button {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #413c34;
  border-radius: 9px;
  color: #aaa297;
  background: #1b1a17;
  font-weight: 700;
}

.sc-allocation button.active {
  color: #17120e;
  border-color: #e3a65f;
  background: #e3a65f;
}

.sc-empty-list {
  padding: 10px;
  border: 1px dashed #4a443b;
  border-radius: 8px;
  color: #a8a095;
  font-size: 12px;
}

.sc-empty-list a { color: #efb66f; text-decoration: underline; }

.sc-server-grid,
.sc-run-grid {
  display: grid;
  /* 3-per-row like the netscan fleet grid (nc-scan-grid), not auto-fit. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-items: stretch;
}

@media (max-width: 1120px) {

  .sc-server-grid,
  .sc-run-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {

  .sc-server-grid,
  .sc-run-grid {
    grid-template-columns: 1fr;
  }
}

/* The phx-update="stream" wrapper between .sc-server-grid and the cards is a
   plain div: without this it becomes a single grid item holding every card,
   collapsing the whole grid into one column. */
.sc-server-grid > #scanner-vps-grid {
  display: contents;
}

/* display:grid above beats the UA [hidden]{display:none} rule — same fix as nc-scan-grid */
.sc-run-row .sc-run-grid[hidden] {
  display: none !important;
}

.sc-server-empty {
  display: flex;
  grid-column: 1 / -1;
  min-height: 176px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border: 1px dashed #514938;
  border-radius: 11px;
  color: #b8afa2;
  background: #211f1b;
  text-align: left;
}

.sc-server-empty > .ag-icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: #e8ad67;
}

.sc-server-empty > div {
  display: grid;
  gap: 3px;
}

.sc-server-empty strong { color: #f2eee8; font-size: 13px; }
.sc-server-empty span { color: #958e83; font-size: 11px; }

.sc-server-empty button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 0 10px;
  border: 1px solid #4a443b;
  border-radius: 8px;
  color: #d6cec2;
  background: #181714;
  font-size: 10px;
  font-weight: 800;
}

.sc-server-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  min-height: 176px;
  border-top: 2px solid var(--server-color);
}

.sc-server-card.selected {
  border-color: var(--server-color);
  background: color-mix(in srgb, var(--server-color) 10%, #26241f);
}

.sc-server-card > header button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  color: #eae5dd;
  background: transparent;
  text-align: left;
}

.sc-server-card > header button:disabled { cursor: not-allowed; opacity: .7; }

.sc-server-card i,
.sc-assignment > header i {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--server-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--server-color) 18%, transparent);
}

.sc-server-card.is-online > header button > i {
  background: var(--ag-online-dot);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ag-online-dot) 18%, transparent);
}

.sc-server-card > header em,
.sc-assignment > header em {
  margin-left: auto;
  color: #9d968a;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.sc-server-fields {
  display: grid;
  grid-template-columns: .8fr 1.35fr .7fr;
  gap: 6px;
  padding: 0 9px 8px;
}

.sc-manual-count { padding: 0 9px 8px; }

.sc-card-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 10px;
  color: #ff927f;
  font-size: 11px;
}

.sc-server-card > footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-top: 1px solid #3c3831;
  color: #958e83;
  font-size: 10px;
}

.sc-launch-row {
  min-height: 58px;
  border-top: 1px solid #37332d;
  border-bottom: 0;
  color: #948c80;
  font-size: 11px;
}

.sc-launch {
  display: flex;
  min-width: 178px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 16px;
  border: 1px solid #e3a65f;
  border-radius: 9px;
  color: #17120e;
  background: #e3a65f;
  font-weight: 800;
}

.sc-launch:disabled { cursor: not-allowed; opacity: .42; }

/* Plan not ready — still clickable so the flash can explain why (was silent before). */
.sc-launch.is-blocked {
  border-color: #8a6a3a;
  background: #5a4428;
  color: #f0d9b0;
  opacity: 0.92;
}

.sc-launch.is-blocked:hover {
  background: #6a5232;
}

.sc-runs > header { justify-content: space-between; }

.sc-empty-runs {
  margin: 0;
  padding: 28px 16px;
  color: #918a80;
  text-align: center;
}

.sc-run-row { border-top: 1px solid #37332d; }
.sc-run-row:first-of-type { border-top: 0; }

.sc-run-row > header {
  min-height: 54px;
  flex-wrap: wrap;
  border-bottom: 0;
  background: #25231e;
}

.sc-run-row > header p {
  margin: 0 0 0 auto;
  color: #8e877c;
  font-size: 11px;
}

.sc-run-row > header > .sc-run-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.sc-result-action,
.sc-result-list {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid #4a443b;
  border-radius: 7px;
  color: #d6cec2;
  background: #1b1a17;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

.sc-result-action { color: #f0bc7d; }

.sc-result-action:hover:not(:disabled),
.sc-result-list:hover {
  border-color: #887057;
  background: #2c2821;
}

.sc-result-action:disabled {
  cursor: wait;
  opacity: .65;
}

.sc-result-action svg,
.sc-result-list svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.sc-run-row > header em {
  padding: 5px 8px;
  border: 1px solid #4a443b;
  border-radius: 7px;
  color: #bcb4a8;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.sc-run-grid { padding: 10px 14px 14px; }

.sc-assignment {
  overflow: hidden;
  border-top: 2px solid var(--server-color);
}

.sc-assignment.stale { opacity: .7; }

.sc-assignment > header {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #3c3831;
}

.sc-progress { padding: 8px 10px 2px; }

.sc-progress label {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: #b5aea4;
  font-size: 10px;
}

.sc-progress progress {
  width: 100%;
  height: 5px;
  accent-color: var(--server-color);
}

.sc-assignment dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 9px 10px;
}

.sc-actions {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 7px 10px;
  border-top: 1px solid #3c3831;
}

.sc-actions button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #464139;
  border-radius: 9px;
  color: #cfc8bd;
  background: #181714;
}

.sc-shell button:focus-visible,
.sc-shell input:focus-visible,
.sc-shell select:focus-visible,
.sc-shell a:focus-visible {
  outline: 3px solid #efb66f;
  outline-offset: 2px;
}

.sc-shell .spin { animation: sc-spin .9s linear infinite; }
@keyframes sc-spin { to { transform: rotate(360deg); } }

@media (max-width: 1120px) {
  .sc-config-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sc-cockpit-head,
  .sc-run-row > header { align-items: flex-start; flex-direction: column; }
  .sc-header-actions { width: 100%; }
  .sc-online-filter { flex: 1; }
  .sc-totals { width: 100%; margin-left: 0; grid-template-columns: repeat(2, 1fr); }
  .sc-totals div:nth-child(3) { border-left: 0; border-top: 1px solid #3d3932; }
  .sc-totals div:nth-child(4) { border-top: 1px solid #3d3932; }
  .sc-field-grid,
  .sc-field-grid-primary,
  .sc-server-fields { grid-template-columns: 1fr; }
  .sc-run-row > header p { margin-left: 0; }
  .sc-run-row > header > .sc-run-controls { width: 100%; }
  .sc-server-empty { align-items: flex-start; flex-direction: column; }
  .sc-server-empty button { margin-left: 0; }
}

.server-form-section {
  padding: 0.9rem;
  background: color-mix(in srgb, var(--panel-2) 72%, transparent);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.server-form-section legend {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.45rem;
}

.server-form-section legend > span:last-child {
  display: grid;
  gap: 0.05rem;
}

.server-form-section legend strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
}

.server-form-section legend small {
  color: var(--text-muted);
  font-size: 0.64rem;
}

.server-form-section-icon {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 7px;
}

.server-form-section-icon .ag-icon {
  width: 0.86rem;
  height: 0.86rem;
}

.server-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.server-field-grid .ns-field {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  margin: 0;
}

.server-field-grid .ns-field > span {
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 800;
}

.ns-field-required,
.ns-field-error {
  color: var(--danger);
}

.ns-field-help,
.ns-field-error {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.4;
}

.ns-field-help {
  color: var(--text-muted);
}

.ns-field.has-error input,
.ns-field.has-error select,
.ns-field.has-error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px var(--ag-danger-bg);
}

.server-field-grid textarea {
  min-height: 8.5rem;
}

.server-key-upload input {
  min-height: 2.65rem;
  padding: 0.48rem;
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.server-domain-shortcut {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  color: var(--text-dim);
  background: var(--ag-info-bg);
  border: 1px solid var(--ag-info-border);
  border-radius: 8px;
  font-size: 0.67rem;
}

.server-domain-shortcut code {
  color: var(--text);
}

.server-verification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.server-verification-row > div {
  display: grid;
  gap: 0.16rem;
}

.server-verification-row strong {
  color: var(--text);
  font-size: 0.76rem;
}

.server-verification-row span {
  color: var(--text-muted);
  font-size: 0.67rem;
  line-height: 1.35;
}

.server-verify-action {
  flex: 0 0 auto;
}

.server-verify-action .ag-icon,
.server-submit-button .ag-icon {
  width: 0.92rem;
  height: 0.92rem;
}

.server-fingerprint-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  background: var(--ag-ok-bg);
  border-color: var(--ag-ok-border);
}

.server-fingerprint-callout > div {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.server-fingerprint-callout code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.72rem;
}

.server-trust-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin: 0;
  color: var(--text-dim);
  cursor: pointer;
}

.server-submit-button {
  min-height: 2.8rem;
  justify-self: end;
  min-width: 11rem;
}

.server-install-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.server-install-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.69rem;
  line-height: 1.4;
}

.server-form-hint {
  flex: 1 1 auto;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.server-section-heading {
  flex-direction: row;
  align-items: end;
  justify-content: space-between;
}

.server-section-heading h2 {
  margin-top: 0.18rem;
}

.server-section-count {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.server-list {
  display: grid;
  gap: 0.75rem;
}

.server-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.05rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.server-card:hover {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
  transform: translateY(-1px);
}

.server-card.is-selected {
  border-color: rgba(217, 119, 87, 0.62);
  box-shadow: inset 3px 0 0 var(--accent), 0 12px 30px rgba(0, 0, 0, 0.14);
}

.server-card-header,
.server-card-title,
.server-card-actions {
  display: flex;
  align-items: center;
}

.server-card-header {
  justify-content: space-between;
  gap: 1rem;
}

.server-card-title {
  gap: 0.65rem;
  min-width: 0;
}

.server-card-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 850;
}

.server-status-copy {
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: capitalize;
}

.server-status-dot,
.provisioning-entry-dot {
  width: 0.6rem;
  height: 0.6rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(159, 150, 139, 0.12);
}

.server-status-dot.is-online,
.provisioning-entry-dot.is-complete {
  background: #8fbe95;
  box-shadow: 0 0 0 3px rgba(143, 190, 149, 0.14);
}

.server-status-dot.is-offline,
.provisioning-entry-dot.is-failed {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--ag-danger-bg);
}

.server-selected-label {
  color: var(--accent-2);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.server-card-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.server-active-label {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 1.55rem;
  padding: 0.28rem 0.5rem;
  color: var(--text);
  background: var(--ag-ok-bg);
  border: 1px solid var(--ag-ok-border);
  border-radius: 6px;
  font-size: 0.64rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.server-active-label .ag-fleet-pulse {
  width: 0.4rem;
  height: 0.4rem;
}

.server-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.server-card-meta > div {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.server-card-meta span {
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.server-card-meta code {
  overflow: hidden;
  color: var(--text-dim);
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-card-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  padding-top: 0.1rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.server-card-actions form {
  margin: 0;
}

.server-primary-action {
  color: #17130f;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.server-primary-action:disabled {
  color: var(--cpa);
  background: var(--ag-ok-bg);
  border-color: var(--ag-ok-border);
  opacity: 1;
}

.server-icon-button {
  width: 2.15rem;
  min-width: 2.15rem;
  height: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
}

.server-icon-button .ag-icon {
  width: 0.92rem;
  height: 0.92rem;
}

.server-empty-state {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.server-empty-state.compact {
  align-items: flex-start;
}

.server-empty-state strong {
  color: var(--text);
  font-size: 0.84rem;
}

.server-empty-state p,
.provisioning-entry p {
  margin: 0.25rem 0 0;
  color: var(--text-dim);
  font-size: 0.76rem;
  line-height: 1.45;
}

.server-empty-mark {
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent-2);
  border: 1px solid var(--ag-info-border);
  border-radius: 6px;
  font-size: 1.1rem;
}

.server-empty-mark .ag-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.provisioning-timeline {
  display: grid;
  gap: 0.75rem;
}

.provisioning-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.provisioning-entry:last-child {
  border-bottom: 0;
}

.provisioning-entry strong {
  color: var(--text);
  font-size: 0.8rem;
}

.provisioning-entry-status {
  margin-left: 0.45rem;
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: capitalize;
}

.provisioning-log {
  margin-top: 0.55rem;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.provisioning-log summary {
  width: fit-content;
  cursor: pointer;
  color: var(--accent-2);
  font-weight: 800;
}

.provisioning-log ol {
  display: grid;
  gap: 0.25rem;
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
}

.provisioning-log li {
  padding-left: 0.15rem;
}

.provisioning-log time {
  margin-right: 0.45rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
}

.provisioning-open-button {
  margin-top: 0.45rem;
  padding: 0;
  color: var(--accent-2);
  background: transparent;
  border: 0;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 1350px) and (min-width: 1101px) {
  .ag-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

.ns-callout {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
}

/* Netscan fleet workspace */
.nc-shell {
  --nc-line: color-mix(in srgb, var(--border) 76%, transparent);
  width: 100%;
  min-height: calc(100vh - 60px);
  padding: clamp(0.65rem, 1.15vw, 1rem);
  color: var(--text);
}

.nc-detail-header,
.nc-section-heading,
.nc-card-server,
.nc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nc-section-heading > div > span,
.nc-detail-title > div > span,
.nc-card-main > small {
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nc-detail-title h1 {
  margin: 0.16rem 0 0;
  font-size: clamp(1.75rem, 2.4vw, 2.55rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.nc-detail-actions,
.nc-card-footer > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nc-primary-button,
.nc-readiness {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.42rem 0.62rem;
  color: var(--text);
  border: 1px solid var(--nc-line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.nc-card-metrics span,
.nc-detail-metrics span,
.nc-assignment-list label > span {
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nc-launch-panel,
.nc-fleet-section,
.nc-detail-panel {
  max-width: 1880px;
  margin: 0 auto 1rem;
  border: 1px solid var(--nc-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 20px 54px color-mix(in srgb, var(--shadow) 50%, transparent);
}

.nc-fleet-section > .nc-section-heading,
.nc-detail-panel > .nc-section-heading {
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid var(--nc-line);
}

.nc-launch-toolbar {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.5rem;
  padding: 0.48rem 0.7rem;
  border-bottom: 1px solid var(--nc-line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 32%),
    color-mix(in srgb, var(--surface-raised) 58%, transparent);
}

.nc-launch-identity {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}

.nc-launch-identity > span {
  color: var(--accent-2);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nc-launch-stats {
  display: flex;
  align-items: center;
  margin: 0;
}

.nc-launch-stats > div {
  display: flex;
  align-items: baseline;
  gap: 0.38rem;
  min-width: 4.8rem;
  padding: 0.25rem 0.55rem;
  border-left: 1px solid var(--nc-line);
}

.nc-launch-stats dt {
  color: var(--text-muted);
  font-size: 0.55rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nc-launch-stats dd {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.nc-launch-status {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.nc-section-heading h2 {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.nc-section-heading > strong {
  color: var(--text-muted);
  font-size: 0.73rem;
}

.nc-readiness {
  min-height: 1.8rem;
  color: var(--warning);
  background: var(--ag-warning-bg);
  border-color: var(--ag-warning-border);
}

.nc-readiness.is-ready {
  color: var(--ok);
  background: var(--ag-ok-bg);
  border-color: var(--ag-ok-border);
}

.nc-launch-form {
  padding: 0.7rem;
}

.nc-command-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 20rem) minmax(0, 1fr);
  gap: 0.8rem;
}

.nc-range-rail,
.nc-control-deck {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-width: 0;
}

.nc-range-rail .ns-field,
.nc-settings-rail .ns-field {
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.nc-range-rail .ns-field > span,
.nc-settings-rail .ns-field > span {
  font-size: 0.65rem;
}

.nc-range-rail input[type="text"],
.nc-settings-rail input[type="text"],
.nc-settings-rail input[type="number"] {
  min-height: 2rem;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
}

.nc-range-rail textarea {
  min-height: 7.35rem;
  padding: 0.5rem 0.58rem;
  font-size: 0.7rem;
  resize: vertical;
}

.nc-range-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--nc-line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
}

.nc-range-totals > div {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  padding: 0.38rem 0.45rem;
  border-right: 1px solid var(--nc-line);
}

.nc-range-totals > div:last-child {
  border-right: 0;
}

.nc-range-totals dt {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.52rem;
  font-weight: 760;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.nc-range-totals dd {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font: 820 0.76rem ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-range-totals .has-remainder dd {
  color: var(--warning);
}

.nc-toolbar-allocation {
  width: clamp(14rem, 22vw, 19rem);
}

.nc-backend-strip {
  --nc-target-height: 2.85rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.42rem;
  min-width: 0;
}

.nc-server-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  align-items: stretch;
  gap: 0.4rem;
}

.nc-server-choice {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0.42rem;
  height: var(--nc-target-height);
  min-height: var(--nc-target-height);
  padding: 0.34rem 0.42rem;
  cursor: pointer;
  border: 1px solid var(--nc-line);
  border-left: 3px solid color-mix(in srgb, var(--server-color) 36%, var(--border));
  border-radius: 8px;
  background: var(--surface-raised);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nc-server-choice:hover,
.nc-server-choice.is-selected {
  border-color: color-mix(in srgb, var(--server-color) 66%, var(--border));
  border-left-color: var(--server-color);
  background: color-mix(in srgb, var(--server-color) 7%, var(--surface-raised));
}

.nc-server-choice:hover {
  transform: translateY(-1px);
}

.nc-server-choice input {
  width: 0.9rem;
  height: 0.9rem;
  accent-color: var(--server-color);
}

.nc-server-choice > i,
.nc-card-server i,
.nc-assignment-server > i,
.nc-detail-title i,
.nc-config-panel dd i {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--server-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--server-color) 14%, transparent);
}

.nc-server-choice > i {
  background: var(--ag-online-dot);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ag-online-dot) 14%, transparent);
}

/* Non-ready backends stay visible but greyed and unselectable, with the reason. */
.nc-server-choice.is-unavailable {
  cursor: not-allowed;
  opacity: 0.55;
}

.nc-server-choice.is-unavailable:hover {
  transform: none;
  border-color: var(--nc-line);
  background: var(--surface-raised);
}

.nc-server-choice > i.nc-server-health-offline,
.nc-server-choice > i.nc-server-health-quarantined {
  background: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent);
}

.nc-server-choice > i.nc-server-health-degraded,
.nc-server-choice > i.nc-server-health-incompatible,
.nc-server-choice > i.nc-server-health-outdated,
.nc-server-choice > i.nc-server-health-unknown {
  background: var(--warning);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 16%, transparent);
}

.nc-server-choice small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.57rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-server-choice > span,
.nc-assignment-server > span {
  display: grid;
  min-width: 0;
}

.nc-server-choice strong,
.nc-assignment-server strong {
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-assignment-server small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-empty-inline {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.5rem;
  padding: 0.75rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 0.72rem;
}

.nc-empty-inline a {
  color: var(--accent-2);
}


.nc-settings-rail {
  display: flex;
  align-items: flex-end;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.48rem;
  border: 1px solid var(--nc-line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 34%),
    color-mix(in srgb, var(--surface-raised) 76%, transparent);
}

.nc-distribution-control {
  flex: 0 1 13.5rem;
  min-width: 12.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.nc-distribution-control legend,
.nc-settings-rail .ns-field > span {
  display: block;
  margin: 0 0 0.25rem;
  color: var(--text-dim);
  font-size: 0.6rem;
  font-weight: 820;
  line-height: 1.15;
}

.nc-distribution-control > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.18rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-elev);
}

.nc-distribution-control label {
  position: relative;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.nc-distribution-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nc-distribution-control label > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 1.7rem;
  padding: 0.32rem 0.4rem;
  color: var(--text-muted);
  border-radius: 5px;
  font-size: 0.64rem;
  font-weight: 800;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.nc-distribution-control label.is-active > span {
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: 0 1px 5px color-mix(in srgb, var(--shadow) 46%, transparent);
}

.nc-distribution-control label:hover > span {
  color: var(--text);
}

.nc-compact-field {
  flex: 0 1 6.5rem;
  width: 6.5rem;
  min-width: 5.75rem;
}

.nc-ports-field {
  flex-basis: 7.25rem;
  width: 7.25rem;
}

.nc-products-control {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.5rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-elev);
}

.nc-products-control legend {
  padding: 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.54rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nc-products-control > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nc-products-control label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.9rem;
  margin: 0;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.nc-products-control label.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
}

.nc-products-control label input {
  margin: 0;
}

.nc-products-control label span {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.35rem;
  align-items: center;
  line-height: 1.15;
}

.nc-products-control label span .nc-product-check-logo {
  grid-row: 1 / span 2;
  width: 0.95rem;
  height: 0.95rem;
  object-fit: contain;
  border-radius: 2px;
}

.nc-products-control label strong {
  color: var(--text);
  font-size: 0.68rem;
}

.nc-products-control label small {
  color: var(--text-muted);
  font-size: 0.54rem;
  font-weight: 650;
}

.nc-ports-hint {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
}

.nc-settings-rail .ns-field-help {
  display: none;
}

.nc-auto-stage {
  display: flex;
  flex: 0 0 10.5rem;
  align-items: center;
  gap: 0.48rem;
  min-height: 2.45rem;
  margin: 0;
  padding: 0.36rem 0.48rem;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-elev);
}

.nc-auto-stage > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nc-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 1.85rem;
  width: 1.85rem;
  height: 1.05rem;
  padding: 0.13rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  transition: border-color 160ms ease, background 160ms ease;
}

.nc-switch i {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 180ms ease, background 180ms ease;
}

.nc-auto-stage > input[type="checkbox"]:checked ~ .nc-switch {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, var(--panel));
}

.nc-auto-stage > input[type="checkbox"]:checked ~ .nc-switch i {
  background: var(--accent-2);
  transform: translateX(0.76rem);
}

.nc-auto-stage > span:last-child {
  display: grid;
  min-width: 0;
}

.nc-auto-stage small {
  color: var(--text-muted);
  font-size: 0.54rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nc-auto-stage strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-allocation-board {
  margin-top: 0.65rem;
  border: 1px solid var(--nc-line);
  border-radius: 9px;
  overflow: hidden;
}

.nc-allocation-board-inline {
  margin-top: 0;
}

.nc-distribution-control input:focus-visible + span,
.nc-auto-stage > input[type="checkbox"]:focus-visible ~ .nc-switch {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.nc-assignment-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.nc-assignment-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8.5rem, 0.55fr) auto;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.35rem;
  padding: 0.48rem 0.58rem;
  border-right: 1px solid var(--nc-line);
  border-bottom: 1px solid var(--nc-line);
  box-shadow: inset 3px 0 0 var(--server-color);
}

.nc-assignment-list article:nth-child(4n) {
  border-right: 0;
}

.nc-assignment-server {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.nc-assignment-list label {
  display: grid;
  gap: 0.2rem;
}

.nc-assignment-list input {
  width: 100%;
  min-height: 2rem;
  padding: 0.38rem 0.5rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elev);
  font: 750 0.72rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.nc-assignment-list input[readonly] {
  color: var(--text-muted);
  cursor: default;
}

.nc-assign-rest {
  padding: 0.42rem 0.55rem;
  cursor: pointer;
  color: var(--accent-2);
  border: 1px solid var(--ag-info-border);
  border-radius: 6px;
  background: var(--ag-info-bg);
  font-size: 0.63rem;
  font-weight: 800;
}

.nc-validation-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 0.85rem;
  color: var(--warning);
  background: var(--ag-warning-bg);
  font-size: 0.7rem;
  font-weight: 750;
}

.nc-primary-button {
  cursor: pointer;
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.nc-inline-launch {
  box-sizing: border-box;
  height: var(--nc-target-height);
  min-width: 8.8rem;
  min-height: var(--nc-target-height);
  padding-inline: 0.75rem;
  white-space: nowrap;
}

.nc-primary-button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.nc-primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.nc-fleet-section {
  padding-bottom: 0.8rem;
}

.nc-launch-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.35;
}

.nc-launch-banner > span {
  flex: 1 1 auto;
  min-width: 0;
}

.nc-launch-banner > button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.nc-launch-banner > button:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--border) 35%, transparent);
}

.nc-launch-banner.is-info {
  border-color: color-mix(in srgb, #3b82f6 45%, var(--border));
  background: color-mix(in srgb, #3b82f6 12%, var(--surface));
}

.nc-launch-banner.is-error {
  border-color: color-mix(in srgb, #ef4444 50%, var(--border));
  background: color-mix(in srgb, #ef4444 12%, var(--surface));
}

.nc-run-groups {
  display: grid;
}

.nc-scan-run-row {
  min-width: 0;
}

.nc-scan-run-row + .nc-scan-run-row {
  border-top: 6px solid color-mix(in srgb, var(--bg) 72%, var(--border));
}

.nc-scan-run-row:not(.is-expanded) .nc-scan-run-head {
  border-bottom: 0;
}

.nc-group-toggle {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  margin: 0;
  padding: 0 !important;
  color: var(--text-muted);
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background: var(--panel) !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.nc-group-toggle:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border)) !important;
}

/* Hero icons are mask <span>s, not <svg> — rotate the real icon node. */
.nc-group-toggle .ag-icon,
.nc-group-toggle [class*="hero-chevron"] {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  transition: transform 0.15s ease;
}

/* Chevron-right rotates to point down when the section is open. */
.nc-scan-run-row.is-expanded .nc-group-toggle {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border)) !important;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel)) !important;
}

.nc-scan-run-row.is-expanded .nc-group-toggle .ag-icon,
.nc-scan-run-row.is-expanded .nc-group-toggle [class*="hero-chevron"] {
  transform: rotate(90deg);
}

.nc-scan-run-row .nc-scan-grid[hidden] {
  display: none !important;
}

.nc-scan-run-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  padding: 0.48rem 0.75rem;
  border-bottom: 1px solid var(--nc-line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 38%),
    color-mix(in srgb, var(--surface-raised) 76%, transparent);
}

.nc-scan-run-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.nc-scan-run-identity > h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.nc-scan-run-identity > h3.nc-scan-run-untitled {
  color: var(--text-muted);
  font-weight: 700;
}

.nc-scan-product-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-left: 0;
  order: 0;
}

.nc-scan-product-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 1.45rem;
  padding: 0.18rem 0.45rem 0.18rem 0.28rem;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-3) 88%, transparent);
  color: var(--text);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1;
  white-space: nowrap;
}

.nc-scan-product-badge.is-icon-first {
  min-width: 1.55rem;
  min-height: 1.55rem;
  padding: 0.22rem;
  justify-content: center;
}

.nc-scan-product-badge img {
  width: 0.95rem;
  height: 0.95rem;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}

.nc-scan-product-badge.is-cli_proxy {
  border-color: color-mix(in srgb, #5b8def 45%, var(--border));
  background: color-mix(in srgb, #5b8def 12%, var(--panel));
}

.nc-scan-product-badge.is-sub2api {
  border-color: color-mix(in srgb, #34d399 45%, var(--border));
  background: color-mix(in srgb, #34d399 12%, var(--panel));
}

.nc-scan-product-badge.is-nine_router {
  border-color: color-mix(in srgb, #f59e0b 45%, var(--border));
  background: color-mix(in srgb, #f59e0b 12%, var(--panel));
}

.nc-scan-product-badge.is-new_api {
  border-color: color-mix(in srgb, #14b8a6 45%, var(--border));
  background: color-mix(in srgb, #14b8a6 12%, var(--panel));
}

.nc-scan-product-badge.is-ccflare {
  border-color: color-mix(in srgb, #f38020 45%, var(--border));
  background: color-mix(in srgb, #f38020 12%, var(--panel));
}

.nc-scan-run-head .nc-scan-product-badge {
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text);
  font-size: 0.6rem;
  font-weight: 800;
}

.nc-scan-run-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: 0;
}

.nc-scan-run-head span {
  color: var(--accent-2);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nc-scan-run-head h3 {
  overflow: hidden;
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-scan-run-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.nc-run-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nc-scan-run-head .nc-pipeline-state {
  color: var(--text-dim);
  font-size: 0.61rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.nc-run-actions button,
.nc-created-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--accent-2) 44%, var(--border));
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent-2) 8%, var(--panel));
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
}

.nc-run-actions button {
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nc-run-actions button:hover:not(:disabled) {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent-2) 70%, var(--border));
  background: color-mix(in srgb, var(--accent-2) 14%, var(--panel));
  transform: translateY(-1px);
}

.nc-run-actions button:active:not(:disabled) {
  transform: translateY(1px);
}

.nc-run-actions button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.nc-run-actions .is-transition {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 62%, var(--border));
  background: color-mix(in srgb, var(--accent-2) 12%, var(--panel));
}

.nc-run-actions .is-repair {
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 58%, var(--border));
  background: color-mix(in srgb, var(--warning) 12%, var(--panel));
}

/* Stage 1 alive dump — intentionally de-emphasized (not for cracking). */
.nc-run-actions .is-secondary {
  color: var(--text-muted);
  border-color: color-mix(in srgb, var(--text-muted) 40%, var(--border));
  background: color-mix(in srgb, var(--text-muted) 8%, var(--panel));
}

.nc-created-list {
  color: var(--ok);
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

.nc-run-actions button:disabled {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--panel);
  cursor: wait;
}

.nc-run-admin-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nc-run-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 1.85rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--accent-2) 44%, var(--border));
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent-2) 8%, var(--panel));
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nc-run-admin:hover:not(:disabled) {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent-2) 70%, var(--border));
  background: color-mix(in srgb, var(--accent-2) 14%, var(--panel));
  transform: translateY(-1px);
}

.nc-run-admin:active:not(:disabled) {
  transform: translateY(1px);
}

.nc-run-admin:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.nc-run-admin:disabled {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--panel);
  cursor: wait;
}

.nc-run-admin.is-delete {
  color: var(--danger, #f87171);
  border-color: color-mix(in srgb, var(--danger, #f87171) 45%, transparent);
  background: color-mix(in srgb, var(--danger, #f87171) 12%, transparent);
}

.nc-scan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.85rem;
}

.nc-scan-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--server-color) 68%, var(--border));
  border-top: 3px solid var(--server-color);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--server-color) 5%, var(--shadow));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.nc-scan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--server-color) 10%, var(--shadow));
}

.nc-scan-card:not(.is-expanded) {
  box-shadow: 0 4px 14px color-mix(in srgb, var(--server-color) 4%, var(--shadow));
}

.nc-scan-card:not(.is-expanded):hover {
  transform: none;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--server-color) 8%, var(--shadow));
}

.nc-scan-card.is-stalled,
.nc-scan-card.is-unresponsive,
.nc-scan-card.is-interrupted,
.nc-scan-card.is-offline {
  border-color: color-mix(in srgb, var(--warning) 72%, var(--border));
  border-top-color: var(--warning);
}

.nc-card-head {
  display: grid;
  gap: 0;
}

.nc-card-head-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-left: auto;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.nc-card-head-link:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--server-color) 40%, var(--border));
}

.nc-card-head-link svg {
  width: 0.85rem;
  height: 0.85rem;
}

.nc-card-summary {
  padding: 0.45rem 0.65rem 0.6rem;
}

.nc-card-summary h3 {
  overflow: hidden;
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-card-summary > p {
  display: -webkit-box;
  margin: 0.28rem 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.62rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.nc-card-body {
  border-top: 1px solid var(--nc-line);
}

.nc-card-server {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--nc-line);
}

.nc-scan-card:not(.is-expanded) .nc-card-server {
  border-bottom: 0;
}

.nc-card-server > span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  font-size: 0.67rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.42rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nc-status > i {
  width: 0.36rem;
  height: 0.36rem;
  margin-right: 0.3rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.nc-status-running,
.nc-status-busy,
.nc-status-starting,
.nc-status-queued,
.nc-status-attaching {
  color: var(--ok);
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

.nc-status-paused {
  color: var(--warning);
  border-color: var(--ag-warning-border);
  background: var(--ag-warning-bg);
}

.nc-status-stalled,
.nc-status-unresponsive,
.nc-status-interrupted,
.nc-status-capacity_limited,
.nc-status-recovering,
.nc-status-offline {
  color: var(--warning);
  border-color: var(--ag-warning-border);
  background: var(--ag-warning-bg);
}

.nc-status-failed,
.nc-status-needs_attention,
.nc-status-stopped {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

.nc-card-main {
  display: block;
  min-height: 0;
  padding: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.nc-scan-card.is-expanded .nc-card-main {
  min-height: 9.2rem;
}

.nc-card-main h3 {
  overflow: hidden;
  margin: 0.28rem 0 0;
  font-size: 0.88rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-card-main p {
  display: -webkit-box;
  min-height: 2.25rem;
  margin: 0.45rem 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.64rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.nc-runtime-alert {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2rem;
  margin: 0.55rem 0 -0.15rem;
  padding: 0.42rem 0.5rem;
  color: var(--warning);
  border-left: 2px solid currentColor;
  background: color-mix(in srgb, var(--warning) 7%, transparent);
  font-size: 0.59rem;
  font-weight: 700;
  line-height: 1.3;
}

.nc-runtime-alert svg {
  flex: 0 0 auto;
  width: 0.88rem;
  height: 0.88rem;
}

/* Attaching/launching is benign — render calm and muted, never alarming. */
.nc-runtime-alert.is-attaching {
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text-muted) 8%, transparent);
}

.nc-pipeline-progress {
  display: grid;
  gap: 0.34rem;
  margin: 0.5rem 0;
}

.nc-stage-progress {
  display: grid;
  gap: 0.16rem;
}

.nc-stage-progress > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.58rem;
}

.nc-stage-progress > span strong {
  color: var(--text);
  font-size: 0.61rem;
}

.nc-stage-progress > span em {
  overflow: hidden;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-stage-progress > div {
  height: 0.22rem;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 72%, transparent);
}

.nc-stage-progress i {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--server-color);
}

.nc-stage-progress.is-live i::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent 0%, rgb(255 255 255 / 34%) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: nc-progress-sweep 1.8s ease-in-out infinite;
}

@keyframes nc-progress-sweep {
  to { transform: translateX(100%); }
}

.nc-stage-progress-two i {
  background: color-mix(in srgb, var(--server-color) 48%, var(--accent-2));
}

.nc-card-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
}

.nc-card-metrics > div {
  display: grid;
  gap: 0.1rem;
}

.nc-card-metrics strong {
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
}

.nc-card-footer {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: 0.3rem;
  min-height: 0;
  padding: 0.42rem 0.7rem 0.5rem;
  border-top: 1px solid var(--nc-line);
}

.nc-card-footer > .nc-card-telemetry {
  grid-row: 1;
}

.nc-card-footer > .nc-card-controls {
  grid-row: 2;
}

.nc-card-telemetry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.nc-card-telemetry > span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.14rem;
  min-width: 0;
  overflow: hidden;
  padding: 0 0.48rem;
  color: var(--text-muted);
  border-right: 1px solid var(--nc-line);
  font-size: 0.57rem;
  white-space: nowrap;
}

.nc-card-telemetry > span:first-child { padding-left: 0; }
.nc-card-telemetry > span:last-child { border-right: 0; }

.nc-card-telemetry strong {
  color: var(--text);
  font-size: 0.68rem;
}

.nc-card-telemetry small {
  overflow: hidden;
  font-size: 0.5rem;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
}

.nc-card-controls {
  display: grid !important;
  grid-auto-columns: 2.2rem;
  grid-auto-flow: column;
  flex: 0 0 auto;
  gap: 0.38rem !important;
}

.nc-card-controls > :last-child {
  margin-inline-start: auto;
}

.nc-card-telemetry svg {
  width: 0.7rem;
  height: 0.7rem;
}

.nc-live-rate > i {
  width: 0.36rem;
  height: 0.36rem;
  margin-right: 0.08rem;
  border-radius: 50%;
  background: var(--server-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--server-color) 13%, transparent);
}

.nc-scan-card.is-running .nc-live-rate > i {
  animation: nc-rate-pulse 1.4s ease-out infinite;
}

@keyframes nc-rate-pulse {
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--server-color) 2%, transparent); }
}

.nc-card-footer button,
.nc-card-footer a,
.nc-detail-actions button,
.nc-detail-actions a,
.nc-back-button {
  display: inline-grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  cursor: pointer;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nc-card-footer button,
.nc-card-footer a {
  box-sizing: border-box;
  width: 2.2rem;
  min-width: 2.2rem;
  max-width: 2.2rem;
  height: 2.2rem;
  min-height: 2.2rem;
  max-height: 2.2rem;
  padding: 0;
  line-height: 1;
  appearance: none;
}

.nc-card-footer button:hover,
.nc-card-footer a:hover,
.nc-detail-actions button:hover,
.nc-detail-actions a:hover,
.nc-back-button:hover {
  color: var(--text);
  border-color: var(--server-color, var(--accent));
  background: color-mix(in srgb, var(--server-color, var(--accent)) 8%, var(--panel));
  transform: translateY(-1px);
}

.nc-card-footer button:active,
.nc-card-footer a:active { transform: translateY(1px); }

.nc-card-footer .is-danger,
.nc-detail-actions .is-danger {
  color: var(--danger);
}

.nc-card-footer .is-restart {
  color: var(--accent-2);
}

.nc-stage-stack {
  border-top: 1px solid color-mix(in srgb, var(--server-color) 34%, var(--border));
  background: color-mix(in srgb, var(--server-color) 5%, var(--panel));
}

.nc-stage-stack summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.4rem;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.66rem;
  font-weight: 800;
}

.nc-stage-stack summary::-webkit-details-marker {
  display: none;
}

.nc-stage-stack summary span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nc-stage-stack summary strong {
  display: inline-grid;
  min-width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--server-color) 14%, var(--panel));
  font-size: 0.62rem;
}

.nc-stage-stack > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.58rem 0.7rem;
  color: var(--text);
  border-top: 1px solid var(--nc-line);
  text-decoration: none;
}

.nc-stage-stack > a span {
  display: grid;
  min-width: 0;
}

.nc-stage-stack > a strong {
  overflow: hidden;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-stage-stack > a small {
  color: var(--text-muted);
  font-size: 0.58rem;
}

.nc-empty-state {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  min-height: 12rem;
  align-content: center;
  margin: 0.85rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 0.72rem;
}

.nc-empty-state .ag-icon {
  width: 1.4rem;
  height: 1.4rem;
  color: var(--accent-2);
}

.sc-entry .nc-empty-state {
  min-height: 20rem;
  padding: 1.5rem;
}

.sc-entry .nc-empty-state strong {
  color: var(--text);
  font-size: 0.9rem;
}

.sc-entry .nc-empty-state p {
  max-width: 32rem;
  margin: 0;
  text-align: center;
}

.sc-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

/* Netscan detail */
.nc-detail-shell {
  max-width: 1880px;
  margin: 0 auto;
}

.nc-stale-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  padding: 0.75rem;
  color: var(--danger);
  border: 1px solid var(--ag-danger-border);
  border-radius: 8px;
  background: var(--ag-danger-bg);
}

.nc-stale-banner > div {
  display: grid;
}

.nc-stale-banner span {
  color: var(--text-muted);
  font-size: 0.67rem;
}

.nc-detail-header {
  align-items: flex-end;
  margin-bottom: 0.9rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--server-color);
}

.nc-detail-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.nc-detail-title > div {
  min-width: 0;
}

.nc-detail-title > div > span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nc-detail-title h1 {
  overflow: hidden;
  max-width: 70vw;
  font-size: clamp(1.55rem, 3vw, 2.8rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-detail-title p {
  margin: 0.28rem 0 0;
  color: var(--text-muted);
  font: 0.62rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.nc-detail-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nc-detail-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.nc-detail-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 0.9rem;
  border: 1px solid var(--nc-line);
  border-top: 3px solid var(--server-color);
  border-radius: 9px;
  background: var(--panel);
}

.nc-detail-metrics article {
  display: grid;
  gap: 0.18rem;
  padding: 0.9rem;
  border-right: 1px solid var(--nc-line);
}

.nc-detail-metrics article:last-child {
  border-right: 0;
}

.nc-detail-metrics strong {
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.nc-detail-metrics small {
  color: var(--text-muted);
  font-size: 0.63rem;
}

.nc-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.72fr);
  gap: 0.9rem;
}

.nc-detail-layout > main,
.nc-detail-layout > aside {
  display: grid;
  align-content: start;
  gap: 0.9rem;
  min-width: 0;
}

.nc-detail-panel {
  width: 100%;
  margin: 0;
  overflow: hidden;
}

/* P3.15: per-shard failure/typed-reason panel shown when drilling into a
   failed, interrupted, or needs-attention scan. */
.nc-failure-panel {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--border));
  border-top: 2px solid var(--danger);
}

.nc-failure-panel .nc-section-heading > strong {
  color: var(--danger);
}

.nc-failure-reason {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.4;
}

.nc-failure-reason svg {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  color: var(--danger);
}

.nc-result-table {
  max-height: 33rem;
  overflow: auto;
}

.nc-result-table > div {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) auto;
  align-items: center;
  min-height: 2.45rem;
  border-bottom: 1px solid var(--nc-line);
}

.nc-result-table > div:last-child {
  border-bottom: 0;
}

.nc-result-table > div > span {
  padding: 0 0.75rem;
  color: var(--text-muted);
  font: 0.62rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.nc-result-table code {
  overflow: hidden;
  padding: 0.55rem 0;
  color: var(--text);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-result-table a {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  color: var(--text-muted);
}

.nc-result-empty {
  padding: 1.2rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-align: center;
}

.nc-config-panel dl,
.nc-diagnostics-panel dl {
  margin: 0;
}

.nc-config-panel dl > div,
.nc-diagnostics-panel dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.55rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--nc-line);
}

.nc-config-panel dt,
.nc-diagnostics-panel dt {
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: capitalize;
}

.nc-config-panel dd,
.nc-diagnostics-panel dd {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 60%;
  margin: 0;
  overflow: hidden;
  font-size: 0.67rem;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-stage-relation > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  color: var(--text);
  border-bottom: 1px solid var(--nc-line);
  text-decoration: none;
}

.nc-stage-relation > a span {
  display: grid;
  min-width: 0;
}

.nc-stage-relation small {
  color: var(--text-muted);
  font-size: 0.59rem;
  text-transform: uppercase;
}

.nc-stage-relation strong {
  overflow: hidden;
  font: 0.63rem ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nc-ranges-panel > code {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--text);
  border-bottom: 1px solid var(--nc-line);
  font-size: 0.65rem;
  overflow-wrap: anywhere;
}

.nc-shell button:focus-visible,
.nc-shell a:focus-visible,
.nc-shell input:focus-visible,
.nc-shell textarea:focus-visible,
.nc-shell summary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

@media (max-width: 1480px) {
  .nc-assignment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nc-assignment-list article:nth-child(4n) {
    border-right: 1px solid var(--nc-line);
  }

  .nc-assignment-list article:nth-child(2n) {
    border-right: 0;
  }

}

@media (max-width: 1120px) {
  .nc-command-layout,
  .nc-detail-layout {
    grid-template-columns: 1fr;
  }

  .nc-scan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nc-detail-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nc-detail-metrics article:nth-child(3) {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .nc-shell {
    padding: 0.8rem;
  }

  .nc-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .nc-section-heading,
  .nc-scan-run-head {
    align-items: center;
    flex-direction: row;
  }

  .nc-detail-actions {
    justify-content: flex-start;
  }

  .nc-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nc-detail-metrics article:nth-child(2n) {
    border-right: 0;
  }

  .nc-launch-toolbar {
    grid-template-columns: 1fr;
  }

  .nc-launch-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nc-launch-stats > div:nth-child(odd) {
    border-left: 0;
  }

  .nc-launch-status {
    justify-content: flex-start;
  }

  .nc-backend-strip {
    grid-template-columns: 1fr;
  }

  .nc-inline-launch {
    width: 100%;
  }

  .nc-server-picker,
  .nc-assignment-list,
  .nc-scan-grid {
    grid-template-columns: 1fr;
  }

  .nc-settings-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nc-distribution-control,
  .nc-products-control,
  .nc-auto-stage {
    grid-column: 1 / -1;
    width: auto;
    min-width: 0;
  }

  .nc-compact-field,
  .nc-ports-field {
    width: auto;
    min-width: 0;
  }

  .nc-assignment-list article,
  .nc-assignment-list article:nth-child(2n),
  .nc-assignment-list article:nth-child(3n) {
    grid-template-columns: 1fr;
    border-right: 0;
  }

  .nc-scan-run-head p {
    text-align: left;
  }

  .nc-scan-run-summary {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nc-run-actions {
    flex-wrap: wrap;
  }

  .nc-detail-title h1 {
    max-width: 72vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nc-scan-card,
  .nc-server-choice,
  .nc-primary-button {
    transition: none;
  }

  .nc-stage-progress.is-live i::after,
  .nc-scan-card.is-running .nc-live-rate > i {
    animation: none;
  }
}

@media (max-width: 820px) {
  .ns-form-grid { grid-template-columns: 1fr; }
  .ag-server-switcher select { max-width: 150px; }
  .server-intro-heading,
  .server-card-meta,
  .server-provision-layout,
  .server-field-grid { grid-template-columns: 1fr; }
  .server-section-heading { align-items: flex-start; }
  .server-step-rail {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .server-step {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .server-verification-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .provisioning-console-head,
  .server-install-footer,
  .server-domain-shortcut {
    align-items: flex-start;
    flex-direction: column;
  }
  .provisioning-phase-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .server-submit-button {
    width: 100%;
    justify-self: stretch;
  }
}

/* Proxy V2 fleet command center */
.px2-command-center,
.px2-pool-workspace {
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid #3b3730;
  border-radius: 14px;
  background: #1c1b18;
}

.px2-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid #39352e;
}

.px2-title-lockup {
  display: flex;
  min-height: 104px;
  flex-direction: column;
  justify-content: center;
  padding: 20px 24px;
}

.px2-kicker {
  color: #e4a55e;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.px2-title-lockup h1,
.px2-workspace-head h2,
.px2-import-card h3 {
  margin: 3px 0 0;
  color: #eeeae3;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.px2-title-lockup h1 { font-size: clamp(25px, 2.2vw, 36px); }
.px2-title-lockup p { margin: 4px 0 0; color: #8f887d; font-size: 12px; }

.px2-fleet-totals {
  display: grid;
  min-width: 470px;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  margin: 0;
}

.px2-fleet-totals > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 16px;
  border-left: 1px solid #39352e;
}

.px2-fleet-totals dt,
.px2-live-metrics dt,
.px2-health-strip dt,
.px2-workspace-head dt {
  color: #837b70;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.px2-fleet-totals dd,
.px2-live-metrics dd,
.px2-health-strip dd,
.px2-workspace-head dd { margin: 0; color: #e6e1d8; font-weight: 750; }
.px2-fleet-totals dd { font-size: 18px; }
.px2-fleet-totals .is-alert dd { color: #e87764; }

.px2-test-controls {
  display: grid;
  grid-template-columns: minmax(300px, auto) minmax(340px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #39352e;
  background: #211f1b;
}

.px2-scope-control,
.px2-publication-scope {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #423d35;
  border-radius: 9px;
  background: #161512;
}

.px2-scope-control button,
.px2-publication-scope button {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  color: #9c9489;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.px2-scope-control button.active,
.px2-publication-scope button.active {
  color: #17130f;
  background: #e5a75f;
}

.px2-scope-control .ag-icon,
.px2-publication-scope .ag-icon,
.px2-run-button .ag-icon { width: 14px; height: 14px; }

.px2-run-control {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, auto);
  align-items: end;
  justify-self: end;
  gap: 8px;
  width: min(100%, 470px);
}

.px2-run-control label { display: grid; gap: 4px; }
.px2-run-control label > span { color: #928a7e; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.px2-run-control input { height: 38px; margin: 0; font-weight: 500; }

.px2-run-button {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
  color: #17120e;
  border-color: #e5a75f;
  background: #e5a75f;
  font-size: 11px;
  font-weight: 850;
}

.px2-run-button:disabled { color: #766e63; border-color: #3e3932; background: #27241f; }

.px2-server-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
  padding: 10px 16px;
  border-bottom: 1px solid #39352e;
}

.px2-server-picker label {
  display: grid;
  min-width: 0;
  min-height: 38px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  cursor: pointer;
  border: 1px solid #433e36;
  border-radius: 8px;
  background: #23211d;
}

.px2-server-picker label > i { width: 7px; height: 7px; border-radius: 50%; background: var(--server-color); box-shadow: 0 0 0 4px color-mix(in srgb, var(--server-color) 18%, transparent); }
.px2-server-picker label:not(.is-offline) > i { background: var(--ag-online-dot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ag-online-dot) 18%, transparent); }
.px2-server-picker label > span { overflow: hidden; color: #d8d2c9; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.px2-server-picker label > em { color: #827a6f; font-size: 8px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.px2-server-picker label.is-offline { cursor: not-allowed; opacity: 0.45; }

.px2-local-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 16px;
  color: #aaa297;
  border-bottom: 1px solid #39352e;
  font-size: 10px;
}

.px2-local-progress strong { color: #e5a75f; }
.px2-local-progress > div { overflow: hidden; height: 4px; grid-column: 1 / -1; border-radius: 99px; background: #39352e; }
.px2-local-progress > div > i { display: block; height: 100%; background: #e5a75f; }

.px2-vps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap: 10px;
  padding: 14px;
}

.px2-vps-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid #423d35;
  border-top: 2px solid color-mix(in srgb, var(--server-color) 56%, #423d35);
  border-radius: 10px;
  background: #24221e;
  opacity: 0.72;
  transition: border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.px2-vps-card.is-targeted,
.px2-vps-card.is-running,
.px2-vps-card.is-starting { opacity: 1; }
.px2-vps-card.is-running,
.px2-vps-card.is-starting { border-color: var(--server-color); transform: translateY(-1px); }
.px2-vps-card.is-failed { border-color: #934a3f; opacity: 1; }
.px2-vps-card.is-offline { opacity: 0.42; }

.px2-vps-card > header {
  display: flex;
  min-height: 47px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #3a362f;
}

.px2-vps-card > header > div { display: flex; min-width: 0; align-items: center; gap: 8px; }
.px2-vps-card > header i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--server-color); box-shadow: 0 0 0 5px color-mix(in srgb, var(--server-color) 16%, transparent); }
.px2-vps-card:not(.is-offline) > header i { background: var(--ag-online-dot); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ag-online-dot) 16%, transparent); }
.px2-vps-card > header strong { overflow: hidden; color: #e9e4dc; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.px2-vps-card > header span { flex: none; color: #91897d; font-size: 8px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.px2-vps-card.is-running > header span,
.px2-vps-card.is-starting > header span { color: #e5ad6d; }
.px2-vps-card.is-succeeded > header span { color: #8fc397; }
.px2-vps-card.is-failed > header span { color: #ef826e; }

.px2-progress-copy {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 8px;
  padding: 12px 12px 7px;
}

.px2-progress-copy strong { color: #eee8df; font-size: 20px; letter-spacing: -0.04em; }
.px2-progress-copy span,
.px2-progress-copy em { color: #938b80; font-size: 9px; font-style: normal; }
.px2-progress-copy em { text-align: right; }

.px2-progress { overflow: hidden; height: 4px; margin: 0 12px 12px; border-radius: 99px; background: #39352e; }
.px2-progress > i { display: block; height: 100%; border-radius: inherit; background: var(--server-color); transition: width 280ms ease; }
.px2-vps-card.is-running .px2-progress > i { box-shadow: 0 0 8px color-mix(in srgb, var(--server-color) 65%, transparent); }

.px2-live-metrics,
.px2-health-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #39352e;
}

.px2-live-metrics > div,
.px2-health-strip > div { display: grid; min-width: 0; gap: 4px; padding: 9px 10px; border-left: 1px solid #39352e; }
.px2-live-metrics > div:first-child,
.px2-health-strip > div:first-child { border-left: 0; }
.px2-live-metrics dd,
.px2-health-strip dd { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.px2-health-strip { background: #1f1e1a; }
.px2-health-strip .healthy dd { color: #8fc397; }
.px2-health-strip .unhealthy dd { color: #eb7967; }
.px2-health-strip .cooling dd { color: #ddb16c; }

.px2-card-error { display: flex; align-items: flex-start; gap: 6px; margin: 0; padding: 9px 11px; color: #f08a76; border-top: 1px solid #703d35; background: rgba(130, 53, 44, 0.16); font-size: 9px; }
.px2-card-error .ag-icon { width: 13px; height: 13px; flex: none; }

.px2-publication-log { margin: 12px 0; }

.px2-workspace-head {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid #39352e;
  background: #211f1b;
}

.px2-workspace-head h2 { font-size: 20px; }
.px2-workspace-head > dl { display: grid; grid-template-columns: repeat(5, minmax(62px, 1fr)); margin: 0; }
.px2-workspace-head > dl > div { display: grid; gap: 2px; padding: 1px 13px; border-left: 1px solid #403b34; }
.px2-workspace-head > dl dd { font-size: 13px; }
.px2-workspace-head > dl .healthy dd { color: #8fc397; }
.px2-workspace-head > dl .cooling dd { color: #ddb16c; }
.px2-workspace-head > dl .unhealthy dd { color: #eb7967; }
.px2-maintenance-actions { display: flex; gap: 6px; }
.px2-maintenance-actions button { min-height: 34px; padding: 0 10px; font-size: 9px; }

.px2-import-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); }
.px2-import-card { position: relative; padding: 16px 18px 18px; }
.px2-import-card + .px2-import-card { border-left: 1px solid #39352e; }
.px2-import-card > header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 12px; }
.px2-import-card h3 { font-size: 17px; }
.px2-publication-scope { position: absolute; top: 14px; right: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.px2-import-card textarea { min-height: 116px; resize: vertical; font-weight: 500; }
.px2-import-card input { font-weight: 500; }
.px2-import-card form > button { min-height: 38px; }

@media (max-width: 1120px) {
  .px2-hero,
  .px2-workspace-head { grid-template-columns: 1fr; }
  .px2-fleet-totals { min-width: 0; border-top: 1px solid #39352e; }
  .px2-fleet-totals > div:first-child { border-left: 0; }
  .px2-workspace-head > dl > div:first-child { border-left: 0; }
  .px2-maintenance-actions { justify-self: start; }
}

@media (max-width: 760px) {
  .px2-test-controls,
  .px2-run-control,
  .px2-import-grid { grid-template-columns: 1fr; }
  .px2-run-control { justify-self: stretch; width: 100%; }
  .px2-scope-control { width: 100%; }
  .px2-fleet-totals { grid-template-columns: repeat(3, 1fr); }
  .px2-fleet-totals > div:nth-child(4) { border-top: 1px solid #39352e; }
  .px2-vps-grid { grid-template-columns: 1fr; }
  .px2-workspace-head > dl { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .px2-import-card + .px2-import-card { border-top: 1px solid #39352e; border-left: 0; }
  .px2-publication-scope { position: static; margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .px2-vps-card,
  .px2-progress > i { transition: none; }
}

/* Proxy fleet workspace */
.px3-proxy-fleet .px2-title-lockup {
  min-height: 126px;
}

.px3-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.px3-hero-actions button,
.px3-hero-actions a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  color: #b9b1a6;
  border: 1px solid #474138;
  border-radius: 7px;
  background: #24211d;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.px3-hero-actions button:hover:not(:disabled),
.px3-hero-actions a:hover {
  color: #eee8df;
  border-color: #6c5a44;
  background: #2a261f;
}

.px3-hero-actions button.is-active {
  color: #1b1611;
  border-color: #9ccc5d;
  background: #9ccc5d;
}

.px3-hero-actions a {
  color: #1b1611;
  border-color: #e5a75f;
  background: #e5a75f;
}

.px3-hero-actions .ag-icon {
  width: 13px;
  height: 13px;
}

.px3-vps-grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
  padding: 16px;
  background: #191815;
}

.px3-vps-card {
  display: flex;
  flex-direction: column;
  border-top-width: 3px;
  background: #24221e;
  opacity: 1;
}

.px3-vps-card.is-online {
  border-top-color: color-mix(in srgb, var(--server-color) 78%, #6a6258);
}

.px3-vps-card.is-workspace {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--server-color) 34%, transparent);
}

.px3-vps-card.is-resource-target {
  border-color: #d39755;
  box-shadow: inset 0 0 0 1px rgba(229, 167, 95, 0.24);
}

.px3-vps-card.is-offline {
  border-color: #4a453d;
  border-top-color: #6a6258;
  opacity: 1;
}

.px3-vps-card > .px3-card-head {
  min-height: 60px;
  padding: 12px 14px;
  background: #27241f;
}

.px3-card-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.px3-card-identity > i {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--ag-online-dot);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--ag-online-dot) 15%, transparent);
}

.px3-vps-card.is-offline .px3-card-identity > i {
  background: #756d62;
  box-shadow: 0 0 0 5px rgba(117, 109, 98, 0.14);
}

.px3-card-identity > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.px3-vps-card .px3-card-identity strong {
  overflow: hidden;
  color: #eee9e1;
  font-size: 15px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.px3-vps-card .px3-card-identity span {
  color: #dca261;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.px3-vps-card .px3-server-state {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 8px;
  color: #9c9489;
  border: 1px solid #484239;
  border-radius: 6px;
  background: #1d1b18;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.px3-vps-card .px3-server-state.is-online {
  color: #99c79d;
  border-color: rgba(111, 159, 117, 0.42);
  background: rgba(61, 100, 67, 0.15);
}

.px3-vps-card .px3-server-state.is-offline {
  color: #aaa297;
}

.px3-card-loading {
  display: grid;
  min-height: 136px;
  align-content: center;
  gap: 9px;
  padding: 18px 14px;
}

.px3-card-loading > span {
  color: #7f786e;
  font-size: 10px;
}

.px3-skeleton {
  width: 54%;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #302d27, #3b3730, #302d27);
  background-size: 200% 100%;
  animation: px3-skeleton-shift 1.6s ease-in-out infinite;
}

.px3-skeleton.is-wide {
  width: 84%;
  height: 28px;
}

@keyframes px3-skeleton-shift {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

.px3-card-inventory {
  display: grid;
  grid-template-columns: minmax(118px, 0.8fr) minmax(0, 1.2fr);
  min-height: 136px;
  border-bottom: 1px solid #39352e;
}

.px3-card-total {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 17px 14px;
  border-right: 1px solid #39352e;
}

.px3-card-total > span,
.px3-health-metrics dt,
.px3-test-metrics dt {
  color: #817a70;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.px3-card-total > strong {
  overflow: hidden;
  margin-top: 4px;
  color: #f0ebe3;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  text-overflow: ellipsis;
}

.px3-card-total > em {
  margin-top: 7px;
  color: #9b9388;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.px3-health-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.px3-health-metrics > div {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border-left: 1px solid #39352e;
  border-top: 1px solid #39352e;
}

.px3-health-metrics > div:nth-child(-n + 2) {
  border-top: 0;
}

.px3-health-metrics dd {
  overflow: hidden;
  margin: 0;
  color: #ddd7ce;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.px3-health-metrics .healthy dd { color: #8fc397; }
.px3-health-metrics .unhealthy dd { color: #eb7967; }
.px3-health-metrics .cooling dd { color: #ddb16c; }

.px3-card-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px;
  color: #a59d92;
  border-bottom: 1px solid #39352e;
  background: #211f1b;
  font-size: 10px;
  line-height: 1.45;
}

.px3-card-notice .ag-icon {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
}

.px3-card-notice > span {
  display: grid;
  gap: 1px;
}

.px3-card-notice strong {
  color: #ddd7ce;
  font-size: 11px;
}

.px3-card-notice.is-empty .ag-icon { color: #d7a466; }
.px3-card-notice.is-offline .ag-icon { color: #938b80; }
.px3-card-notice.is-error { color: #e18a78; background: rgba(124, 54, 45, 0.12); }
.px3-card-notice.is-error strong,
.px3-card-notice.is-error .ag-icon { color: #ef8b77; }

.px3-test-state {
  border-bottom: 1px solid #39352e;
  background: #1f1d19;
}

.px3-test-state-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px 7px;
  color: #b4aca1;
  font-size: 10px;
  font-weight: 750;
}

.px3-test-state-copy strong {
  color: #e7aa64;
  font-size: 10px;
}

.px3-test-state .px2-progress {
  margin: 0 13px 10px;
}

.px3-test-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #39352e;
}

.px3-test-metrics > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 8px 9px;
  border-left: 1px solid #39352e;
}

.px3-test-metrics > div:first-child { border-left: 0; }
.px3-test-metrics dd { overflow: hidden; margin: 0; color: #d8d2c9; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.px3-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: auto;
  border-top: 1px solid #39352e;
  background: #211f1b;
}

.px3-card-actions > button,
.px3-card-actions > form,
.px3-card-actions > form > button {
  width: 100%;
  min-width: 0;
}

.px3-card-actions > form {
  display: flex;
}

.px3-card-actions button {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  color: #b1a99e;
  border: 0;
  border-left: 1px solid #39352e;
  border-radius: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.px3-card-actions > button:first-child { border-left: 0; }
.px3-card-actions button:hover:not(:disabled) { color: #eee8df; background: #2a2721; }
.px3-card-actions button.is-selected { color: #201811; background: #dca05d; }
.px3-card-actions button:disabled { color: #6f685f; background: transparent; opacity: 1; }
.px3-card-actions .ag-icon { width: 14px; height: 14px; }

.px3-test-console {
  border-top: 1px solid #39352e;
  background: #1d1b18;
}

.px3-test-console > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 17px;
  border-bottom: 1px solid #39352e;
}

.px3-test-console > header h2,
.px3-activity-head h2,
.px3-lists-workspace h2,
.px3-proxy-rows h2 {
  margin: 2px 0 0;
  color: #eae5dd;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.px3-test-console > header p,
.px3-workspace-title p {
  margin: 3px 0 0;
  color: #8f887e;
  font-size: 10px;
}

.px3-workspace-title p strong { color: #d9a366; }

.px3-test-summary {
  color: #9d958a;
  font-size: 10px;
  font-weight: 700;
}

.px3-test-console .px2-test-controls,
.px3-test-console .px2-server-picker,
.px3-test-console .px2-local-progress {
  border-bottom: 0;
}

.px3-fleet-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin: 16px;
  padding: 19px;
  color: #9b9388;
  border: 1px dashed #4b453c;
  border-radius: 10px;
  background: #211f1b;
}

.px3-fleet-empty > .ag-icon {
  width: 24px;
  height: 24px;
  color: #d49a59;
}

.px3-fleet-empty > div { display: grid; gap: 3px; }
.px3-fleet-empty strong { color: #e5dfd7; font-size: 13px; }
.px3-fleet-empty span { font-size: 9px; }
.px3-fleet-empty button { display: flex; min-height: 34px; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; }
.px3-fleet-empty button .ag-icon { width: 13px; height: 13px; }

.px3-lists-workspace,
.px3-proxy-rows,
.px3-activity-log {
  overflow: hidden;
  margin: 12px 0;
  border-radius: 14px;
}

.px3-lists-workspace .proxy-list-card-header {
  min-height: 78px;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
}

.px3-lists-workspace .proxy-list-card-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.px3-lists-workspace .proxy-list-card-title > div {
  display: grid;
  min-width: 0;
}

.px3-distribute-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
}

.px3-distribute-control > span {
  max-width: 180px;
  color: #8f887e;
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
}

.px3-distribute-control > span strong { color: #d8d1c7; }
.px3-distribute-control .proxy-list-upload-control { min-width: 210px; }

/* C3.5 — simple bulk manage: single horizontal toolbar */
.px3-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px 22px;
  padding: 10px 16px;
  border-bottom: 1px solid #39352e;
  background: #201e1a;
}

.px3-bulk-group {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.px3-bulk-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8f887e;
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.px3-bulk-label .ag-icon {
  width: 13px;
  height: 13px;
  color: #d89d5a;
}

.px3-bulk-toolbar .proxy-list-upload-control {
  min-width: 200px;
}

.px3-bulk-server-picker {
  padding: 8px 16px 12px;
  border-bottom: 1px solid #39352e;
  background: #1c1b18;
}

.px3-bulk-selection {
  display: none;
  border-bottom: 1px solid #39352e;
  background: #24211c;
}

.px3-bulk-selection.is-open {
  display: block;
}

.px3-merge-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.px3-merge-bar input[type="text"] {
  min-width: 180px;
  max-width: 260px;
  flex: 1 1 180px;
}

/* Full-page table — no nested max-height scroll cage */
.px3-lists-table {
  width: 100%;
  overflow-x: auto;
}

.px3-lists-table table {
  width: 100%;
  border-collapse: collapse;
}

.px3-lists-table th,
.px3-lists-table td {
  padding: 7px 10px;
  font-size: 12px;
  vertical-align: middle;
}

.px3-lists-table tbody tr.is-selected {
  background: rgba(229, 167, 95, 0.08);
}

.px3-col-select {
  width: 44px;
  text-align: center;
}

.px3-protocol-cell {
  font-size: 11px !important;
  white-space: nowrap;
}

.px3-list-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.px3-list-actions-primary,
.px3-list-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.px3-list-actions-secondary {
  opacity: 0.92;
}

.px3-test-state.is-active {
  background: #221f19;
}

.px3-test-state.is-failed {
  background: rgba(124, 54, 45, 0.1);
}

.px3-test-state .px2-progress.is-indeterminate > i {
  width: 28% !important;
  animation: px3-indeterminate 1.2s ease-in-out infinite;
}

@keyframes px3-indeterminate {
  0% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(180%); opacity: 1; }
  100% { transform: translateX(0); opacity: 0.55; }
}

.px3-merge-workbench {
  border-bottom: 1px solid #39352e;
  background: #201e1a;
}

.px3-merge-workbench > summary {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  cursor: pointer;
  color: #b4aca1;
  font-size: 10px;
  font-weight: 760;
  list-style: none;
}

.px3-merge-workbench > summary::-webkit-details-marker { display: none; }
.px3-merge-workbench > summary > span { display: flex; align-items: center; gap: 7px; }
.px3-merge-workbench > summary .ag-icon { width: 14px; height: 14px; color: #d89d5a; }
.px3-merge-workbench > summary em { color: #888075; font-size: 9px; font-style: normal; }
.px3-merge-workbench[open] > summary { border-bottom: 1px solid #39352e; }
.px3-merge-workbench > form { padding: 12px 16px; }
.px3-merge-workbench .form-row { margin: 0; align-items: end; }
.px3-merge-submit { max-width: 180px; }

.px3-activity-log {
  border: 1px solid #3b3730;
  background: #1c1b18;
}

.px3-activity-head {
  display: flex;
  min-height: 65px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid #39352e;
  background: #211f1b;
}

.px3-activity-head > span { color: #8d857a; font-size: 10px; }
.px3-activity-log .fleet-resource-operation { margin: 0; border: 0; border-top: 1px solid #39352e; border-radius: 0; }
.px3-activity-log .fleet-resource-operation:first-of-type { border-top: 0; }

.px3-proxy-rows > .card-header {
  min-height: 68px;
  align-items: center;
}

.px3-proxy-rows > .card-header > div {
  display: grid;
}

.px3-proxy-rows td button .ag-icon {
  width: 13px;
  height: 13px;
}

@media (max-width: 1120px) {
  .px3-distribute-control {
    width: 100%;
    justify-content: space-between;
  }

  .px3-distribute-control > span {
    max-width: none;
    text-align: left;
  }

  .px3-bulk-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .px3-vps-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .px3-test-console > header,
  .px3-lists-workspace .proxy-list-card-header,
  .px3-distribute-control {
    align-items: flex-start;
    flex-direction: column;
  }

  .px3-test-summary { white-space: normal; }
  .px3-distribute-control .proxy-list-upload-control { width: 100%; min-width: 0; }
  .px3-bulk-toolbar .proxy-list-upload-control { width: 100%; min-width: 0; }
  .px3-merge-bar { flex-direction: column; align-items: stretch; }
  .px3-fleet-empty { grid-template-columns: auto 1fr; }
  .px3-fleet-empty > button { grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
  .px3-merge-submit { max-width: none; }
}

@media (max-width: 430px) {
  .px3-card-inventory { grid-template-columns: 1fr; }
  .px3-card-total { border-right: 0; border-bottom: 1px solid #39352e; }
  .px3-health-metrics > div:nth-child(-n + 2) { border-top: 1px solid #39352e; }
  .px3-health-metrics > div:nth-child(odd) { border-left: 0; }
  .px3-card-actions { grid-template-columns: 1fr; }
  .px3-card-actions button { border-top: 1px solid #39352e; border-left: 0; }
  .px3-card-actions > button:first-child { border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .px3-skeleton { animation: none; }
}

/* SSH fleet workspace */
.ssh-fleet-launch-panel,
.ssh-fleet-runs,
.ssh-resource-hero,
.ssh-instance-workspace {
  --ssh-line: color-mix(in srgb, var(--border) 82%, transparent);
  max-width: 1880px;
  margin-inline: auto;
}

.ssh-fleet-launch-panel {
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.ssh-fleet-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem 1.4rem;
  padding: 1rem;
  border-bottom: 1px solid var(--ssh-line);
  background: color-mix(in srgb, var(--surface-raised) 72%, transparent);
}

.ssh-fleet-picker-copy h2,
.ssh-fleet-runs-heading h2,
.ssh-fleet-run-header h3,
.ssh-resource-hero h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.035em;
}

.ssh-fleet-picker-copy h2 {
  margin-top: 0.18rem;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.ssh-fleet-picker-copy p,
.ssh-fleet-run-header p,
.ssh-resource-hero p,
.ssh-fleet-review-banner p {
  margin: 0.28rem 0 0;
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.45;
}

.ssh-fleet-picker-summary {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 0.35rem;
  min-width: 10rem;
}

.ssh-fleet-picker-summary strong {
  color: var(--accent-2);
  font: 900 1.55rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ssh-fleet-picker-summary span,
.ssh-resource-fleet > span {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ssh-fleet-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.ssh-launch-cta {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
}

.ssh-launch-hint {
  margin: 0;
  color: var(--warning, #f0b429);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.field-error {
  margin-top: 0.3rem;
  color: var(--danger, #f87171);
  font-size: 0.72rem;
  font-weight: 700;
}

.ssh-fleet-select-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 0.45rem;
}

.ssh-fleet-select-card {
  display: grid;
  min-width: 0;
  min-height: 3.6rem;
  align-content: center;
  gap: 0.38rem;
  padding: 0.55rem 0.62rem;
  text-align: left;
  border: 1px solid var(--ssh-line);
  border-left: 3px solid color-mix(in srgb, var(--server-color) 38%, var(--border));
  background: var(--panel-2);
}

.ssh-fleet-select-card:hover,
.ssh-fleet-select-card.is-selected {
  border-color: color-mix(in srgb, var(--server-color) 70%, var(--border));
  border-left-color: var(--server-color);
  background: color-mix(in srgb, var(--server-color) 8%, var(--panel-2));
}

.ssh-fleet-select-card.is-disabled {
  opacity: 0.55;
}

.ssh-fleet-select-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
}

.ssh-fleet-select-card-head i,
.ssh-fleet-server-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--server-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--server-color) 15%, transparent);
}

.ssh-fleet-select-card-head strong {
  overflow: hidden;
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssh-fleet-select-card-head > span {
  color: var(--text-muted);
  font-size: 0.56rem;
  font-weight: 850;
  text-transform: uppercase;
}

.ssh-fleet-select-card-meta {
  overflow: hidden;
  padding-left: 0.88rem;
  color: var(--text-dim);
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssh-brute-fleet-config {
  display: grid;
  gap: 0.62rem;
  padding: 0.8rem 1rem 1rem;
  margin: 0;
}

.ssh-brute-resource-grid {
  grid-template-columns: minmax(15rem, 1.25fr) minmax(15rem, 1fr) minmax(11rem, 0.7fr);
}

.ssh-brute-resource-grid.secondary-row {
  grid-template-columns: minmax(15rem, 1fr) minmax(8.5rem, auto) minmax(10rem, 0.55fr) minmax(8rem, 0.4fr);
  align-items: stretch;
}

.ssh-brute-proxy-row {
  display: grid;
  grid-template-columns: auto minmax(15rem, 1fr) minmax(10rem, 0.35fr);
  gap: 0.5rem;
  align-items: stretch;
}

.ssh-brute-proxy-row > .proxy-enable-toggle {
  border: 1px solid var(--ssh-line);
  border-radius: 8px;
}

.ssh-fleet-launch-footer,
.ssh-fleet-runs-heading,
.ssh-fleet-run-header,
.ssh-resource-hero,
.ssh-resource-fleet > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ssh-fleet-launch-footer {
  padding-top: 0.7rem;
  border-top: 1px solid var(--ssh-line);
}

.ssh-fleet-launch-footer > div {
  display: grid;
  gap: 0.12rem;
}

.ssh-fleet-launch-footer strong {
  color: var(--text);
  font-size: 0.74rem;
}

.ssh-fleet-launch-footer span {
  color: var(--text-muted);
  font-size: 0.62rem;
}

.ssh-fleet-review-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 1rem;
  color: var(--ok);
  border-bottom: 1px solid var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

.ssh-fleet-review-banner > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--ag-ok-border);
  border-radius: 8px;
}

.ssh-fleet-review-banner .ag-icon {
  width: 1rem;
  height: 1rem;
}

.ssh-fleet-review-banner strong {
  font-size: 0.78rem;
}

.ssh-fleet-runs {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.ssh-fleet-runs-heading {
  padding: 0.25rem 0.1rem;
}

.ssh-fleet-runs-heading h2 {
  margin-top: 0.12rem;
  font-size: 1rem;
}

.ssh-fleet-run {
  overflow: hidden;
  border: 1px solid var(--ssh-line);
  border-radius: 11px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ssh-fleet-run-header {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--ssh-line);
}

.ssh-fleet-run-header h3 {
  margin-top: 0.16rem;
  font-size: 1rem;
}

.ssh-fleet-run-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.ssh-fleet-run-status {
  padding: 0.35rem 0.5rem;
  color: var(--text-muted);
  border: 1px solid var(--ssh-line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ssh-fleet-run-status.is-discovering,
.ssh-fleet-run-status.is-bruting {
  color: var(--ok);
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

.ssh-fleet-run-status.is-completed_with_issues,
.ssh-fleet-run-status.is-stopped {
  color: var(--warning);
  border-color: var(--ag-warning-border);
  background: var(--ag-warning-bg);
}

.ssh-fleet-shard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0;
}

.ssh-fleet-shard {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 0.75rem;
  border-right: 1px solid var(--ssh-line);
  border-bottom: 1px solid var(--ssh-line);
  box-shadow: inset 3px 0 0 var(--server-color);
}

.ssh-fleet-shard > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.42rem;
}

.ssh-fleet-shard > header strong {
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssh-fleet-shard > header > span:last-child {
  color: var(--text-muted);
  font-size: 0.56rem;
  font-weight: 850;
  text-transform: uppercase;
}

.ssh-fleet-shard-progress {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.ssh-fleet-shard-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.61rem;
}

.ssh-fleet-shard-progress strong {
  color: var(--text);
}

.ssh-fleet-shard .progress-track {
  height: 0.28rem;
  overflow: hidden;
  border-radius: 99px;
  background: var(--panel-3);
}

.ssh-fleet-shard .progress-track i {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: var(--server-color);
}

.ssh-fleet-shard dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
  margin: 0.75rem 0 0;
}

.ssh-fleet-shard dl > div {
  min-width: 0;
}

.ssh-fleet-shard dt {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ssh-fleet-shard dd {
  overflow: hidden;
  margin: 0.15rem 0 0;
  color: var(--text);
  font: 850 0.75rem ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssh-fleet-shard-error {
  margin: 0.7rem 0 0;
  padding: 0.45rem 0.55rem;
  color: var(--danger);
  border: 1px solid var(--ag-danger-border);
  border-radius: 7px;
  background: var(--ag-danger-bg);
  font-size: 0.62rem;
  line-height: 1.4;
}

.ssh-fleet-shard > footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.ssh-fleet-shard > footer:empty {
  display: none;
}

.ssh-fleet-shard > footer button {
  min-height: 1.8rem;
  padding: 0.3rem 0.48rem;
  font-size: 0.61rem;
}

.ssh-fleet-shard.is-recovering {
  background: var(--ag-warning-bg);
}

.ssh-fleet-shard.is-failed,
.ssh-fleet-shard.is-stopped {
  background: color-mix(in srgb, var(--ag-danger-bg) 45%, var(--panel));
}

.ssh-resource-hero {
  padding: 1rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--ssh-line);
  border-radius: 11px;
  background: var(--panel);
}

.ssh-resource-hero h1 {
  margin-top: 0.12rem;
  font-size: 1.35rem;
}

.ssh-resource-fleet {
  display: grid;
  min-width: min(34rem, 48vw);
  gap: 0.28rem;
  justify-items: end;
}

.ssh-resource-fleet > div {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ssh-resource-fleet button {
  min-height: 1.75rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.61rem;
}

.ssh-resource-fleet button i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--server-color);
}

.ssh-resource-fleet button.is-selected {
  color: var(--ok);
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

/* ===== SSH Scan compact config (ss-*) ===== */
.ss-page {
  --ss-line: color-mix(in srgb, var(--border) 78%, transparent);
  --ss-radius: 12px;
  display: grid;
  gap: 0.7rem;
  max-width: 1880px;
  margin: 0 auto 1rem;
  padding: 0 0.1rem 0.75rem;
}

.ss-config {
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem 0.7rem;
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ss-launch-error {
  margin: -0.65rem -0.75rem 0;
  border-radius: var(--ss-radius) var(--ss-radius) 0 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.ss-config-row {
  display: grid;
  gap: 0.45rem;
  align-items: center;
}

.ss-config-fleet {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.5rem 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ss-line);
}

.ss-config-label {
  display: grid;
  gap: 0.1rem;
  min-width: 3.4rem;
}

.ss-config-label span {
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ss-config-label strong {
  color: var(--text);
  font: 850 0.95rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ss-config-label strong.is-warn {
  color: var(--warning);
}

.ss-config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.ss-chip-btn,
.ss-mini-btn,
.ss-action {
  min-height: 1.7rem;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--ss-line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 750;
  cursor: pointer;
}

.ss-chip-btn:hover,
.ss-mini-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--panel-2));
}

.ss-fleet-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
}

.ss-fleet-chip {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.7rem;
  max-width: 100%;
  padding: 0.18rem 0.42rem 0.18rem 0.35rem;
  border: 1px solid var(--ss-line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.ss-fleet-chip i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--server-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--server-color) 16%, transparent);
}

.ss-fleet-chip-name {
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-fleet-chip-meta {
  color: var(--text-muted);
  font: 750 0.56rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ss-fleet-chip.is-selected {
  border-color: color-mix(in srgb, var(--server-color) 70%, var(--border));
  background: color-mix(in srgb, var(--server-color) 12%, var(--panel-2));
}

.ss-fleet-chip.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.ss-config-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.95fr);
  gap: 0.55rem 0.75rem;
  align-items: stretch;
}

.ss-field {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.ss-field label {
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ss-field input[type="text"],
.ss-field input[type="number"],
.ss-field textarea,
.ss-legacy-toolbar input[type="text"] {
  width: 100%;
  min-height: 2rem;
  padding: 0.35rem 0.5rem;
  color: var(--text);
  border: 1px solid var(--ss-line);
  border-radius: 8px;
  background: var(--panel-2);
  font: 650 0.78rem/1.3 inherit;
}

.ss-field textarea {
  min-height: 6.2rem;
  height: 100%;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
}

.ss-field input:focus,
.ss-field textarea:focus,
.ss-legacy-toolbar input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
}

.ss-field .helper-text,
.ss-field .field-error {
  margin: 0;
  font-size: 0.62rem;
}

.ss-config-side {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.ss-field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.ss-field-row-4 {
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.7fr));
}

.ss-config-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.55rem;
  align-items: center;
}

.ss-preview-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--ss-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-raised) 65%, transparent);
  color: var(--text-dim);
  font-size: 0.62rem;
}

.ss-preview-inline strong {
  color: var(--text);
  font: 800 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-right: 0.15rem;
}

.ss-launch-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}

.ss-launch-hint {
  margin: 0;
  color: var(--warning);
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.ss-start-btn {
  min-height: 2.1rem;
  min-width: 8.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.ss-runs {
  display: grid;
  gap: 0.55rem;
}

.ss-runs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.1rem;
}

.ss-runs-bar strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ss-runs-count,
.ss-legacy-count {
  align-self: center;
  padding: 0.16rem 0.45rem;
  color: var(--text-muted);
  border: 1px solid var(--ss-line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 0.58rem;
  font-weight: 800;
}

.ss-run-title h3 {
  margin: 0.12rem 0 0;
  color: var(--text);
  letter-spacing: -0.03em;
  font-size: 0.95rem;
}

.ss-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 1.1rem 1.15rem;
  border: 1px dashed var(--ss-line);
  border-radius: var(--ss-radius);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--text-dim);
}

.ss-empty .ag-icon {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--accent-2);
}

.ss-empty strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
}

.ss-empty span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.74rem;
  line-height: 1.45;
}

.ss-empty-tight {
  grid-template-columns: 1fr;
  padding: 0.85rem 1rem;
}

.ss-run-list {
  display: grid;
  gap: 0.85rem;
}

.ss-run {
  overflow: hidden;
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ss-run-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--ss-line);
  background: color-mix(in srgb, var(--surface-raised) 55%, transparent);
}

.ss-run-title h3 {
  font-size: 1.05rem;
}

.ss-run-title p {
  margin: 0.28rem 0 0;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.ss-run-title p strong {
  color: var(--accent-2);
}

.ss-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  margin-bottom: 0.35rem;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--ss-line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ss-status.is-discovering,
.ss-status.is-preparing,
.ss-status.is-running,
.ss-status.is-starting {
  color: var(--ok);
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

.ss-status.is-review_ready,
.ss-status.is-completed {
  color: var(--accent-2);
  border-color: var(--ag-info-border);
  background: var(--ag-info-bg);
}

.ss-status.is-completed_with_issues,
.ss-status.is-stopped {
  color: var(--warning);
  border-color: var(--ag-warning-border);
  background: var(--ag-warning-bg);
}

.ss-status.is-failed {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

.ss-run-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.ss-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.ss-action .ag-icon {
  width: 0.85rem;
  height: 0.85rem;
}

.ss-shard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 0;
}

.ss-shard {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  min-width: 0;
  padding: 0.8rem 0.85rem 0.75rem;
  border-right: 1px solid var(--ss-line);
  border-bottom: 1px solid var(--ss-line);
  box-shadow: inset 3px 0 0 var(--server-color);
  background: var(--panel);
}

.ss-shard-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.ss-shard-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--server-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--server-color) 15%, transparent);
}

.ss-shard-head strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-shard-status {
  color: var(--text-muted);
  font-size: 0.54rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.ss-shard-bar {
  height: 0.3rem;
  overflow: hidden;
  border-radius: 99px;
  background: var(--panel-3);
}

.ss-shard-bar i,
.ss-legacy-card .ss-shard-bar i {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--server-color, var(--accent)) 70%, #fff),
    var(--server-color, var(--accent))
  );
}

.ss-legacy-card .ss-shard-bar i {
  background: var(--accent);
}

.ss-shard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
}

.ss-shard-stats dt {
  color: var(--text-muted);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ss-shard-stats dd {
  margin: 0.12rem 0 0;
  color: var(--text);
  font: 850 0.78rem/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ss-shard-stats dd.is-open {
  color: var(--ok);
}

.ss-shard-error {
  margin: 0;
  padding: 0.4rem 0.5rem;
  overflow: hidden;
  color: var(--danger);
  border: 1px solid var(--ag-danger-border);
  border-radius: 8px;
  background: var(--ag-danger-bg);
  font-size: 0.62rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ss-shard-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.5rem;
  color: var(--warning);
  border: 1px solid var(--ag-warning-border);
  border-radius: 8px;
  background: var(--ag-warning-bg);
  font-size: 0.62rem;
  line-height: 1.35;
}

.ss-shard-warning .ag-icon {
  flex: none;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.08rem;
}

.ss-run-diagnostics {
  margin: 0.28rem 0 0;
  color: var(--text-dim);
  font-size: 0.66rem;
  line-height: 1.35;
}

.ss-run-diagnostics .ag-icon {
  width: 0.8rem;
  height: 0.8rem;
  vertical-align: -0.12rem;
}

.ss-shard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: 0;
}

.ss-shard-actions:empty {
  display: none;
}

.ss-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.7rem;
  padding: 0.22rem 0.48rem;
  font-size: 0.62rem;
}

.ss-mini-btn .ag-icon {
  width: 0.78rem;
  height: 0.78rem;
}

.ss-mini-btn.is-danger {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

.ss-shard.is-running,
.ss-shard.is-starting {
  background: color-mix(in srgb, var(--ag-ok-bg) 35%, var(--panel));
}

.ss-shard.is-recovering,
.ss-shard.is-waiting_for_backend {
  background: color-mix(in srgb, var(--ag-warning-bg) 55%, var(--panel));
}

.ss-shard.is-failed,
.ss-shard.is-stopped {
  background: color-mix(in srgb, var(--ag-danger-bg) 40%, var(--panel));
}

.ss-legacy {
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.ss-legacy > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
  list-style: none;
}

.ss-legacy > summary::-webkit-details-marker {
  display: none;
}

.ss-legacy-body {
  display: grid;
  gap: 0.65rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--ss-line);
}

.ss-legacy-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
  padding-top: 0.85rem;
}

.ss-legacy-card {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--ss-line);
  border-radius: 11px;
  background: var(--panel-2);
}

.ss-legacy-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.ss-legacy-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.ss-legacy-name {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-legacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.ss-legacy-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.65rem 0 0.45rem;
  color: var(--text-dim);
  font-size: 0.7rem;
}

.ss-legacy-stats strong {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ss-open-preview {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--ss-line);
}

.ss-open-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 750;
}

.ss-open-preview .mono {
  font-size: 0.72rem;
}

@media (max-width: 1100px) {
  .ss-config-fleet {
    grid-template-columns: 1fr;
  }

  .ss-config-main {
    grid-template-columns: 1fr;
  }

  .ss-config-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .ss-field-row,
  .ss-field-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ss-config-footer {
    grid-template-columns: 1fr;
  }

  .ss-launch-cta {
    justify-content: stretch;
  }

  .ss-start-btn {
    width: 100%;
  }

  .ss-run-head,
  .ss-legacy-toolbar,
  .ss-legacy-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .ss-run-actions,
  .ss-legacy-actions {
    justify-content: flex-start;
  }

  .ss-shard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ssh-cracked-origins {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  margin-top: 0.35rem;
}

.ssh-cracked-origins span {
  padding: 0.18rem 0.3rem;
  color: var(--accent-2);
  border: 1px solid var(--ag-info-border);
  border-radius: 999px;
  background: var(--ag-info-bg);
  font-size: 0.52rem;
  font-weight: 800;
}

@media (max-width: 1050px) {
  .ssh-brute-resource-grid,
  .ssh-brute-resource-grid.secondary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ssh-brute-proxy-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ssh-brute-proxy-row > .launch-inline-control:last-child {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .ssh-fleet-picker,
  .ssh-resource-hero,
  .ssh-fleet-run-header,
  .ssh-fleet-runs-heading,
  .ssh-fleet-launch-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
    flex-direction: column;
  }

  .ssh-fleet-picker-summary,
  .ssh-resource-fleet {
    min-width: 0;
    justify-items: start;
  }

  .ssh-resource-fleet > div,
  .ssh-fleet-run-actions {
    justify-content: flex-start;
  }

  .ssh-brute-resource-grid,
  .ssh-brute-resource-grid.secondary-row,
  .ssh-brute-proxy-row {
    grid-template-columns: 1fr;
  }

  .ssh-brute-proxy-row > .launch-inline-control:last-child {
    grid-column: auto;
  }

  .ssh-fleet-launch-footer button {
    width: 100%;
  }

  .ssh-fleet-shard-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Servers page: multi-VPS bulk redeploy + per-card progress
   (feature-scoped block appended for ServersLive)
   ============================================================ */

.server-bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.8rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.server-bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
}

.server-bulk-count {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.server-bulk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}

.server-bulk-clear {
  color: var(--text-muted);
}

/* Tab bar (Fleet / Add server / Activity) */
.server-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.server-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.server-tab:hover {
  color: var(--text);
  border-color: var(--border);
}

.server-tab.is-active {
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--text);
}

/* Overflow dropdown menus (bulk "Advanced", per-card "⋯") */
.server-menu {
  position: relative;
}

.server-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  list-style: none;
  cursor: pointer;
}

.server-menu-toggle::-webkit-details-marker {
  display: none;
}

.server-menu[open] .server-menu-toggle {
  border-color: var(--accent);
}

.server-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 40;
  display: grid;
  gap: 0.2rem;
  min-width: 15rem;
  margin: 0;
  padding: 0.4rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px var(--shadow);
}

.server-menu-list form {
  margin: 0;
}

.server-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.server-menu-item:hover:not(:disabled) {
  background: var(--panel-2);
  border-color: var(--border);
}

.server-menu-item:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.server-menu-item.danger {
  color: var(--danger);
}

.server-menu-item .ag-icon,
.server-menu-item [class^="hero-"] {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.server-card-menu .server-menu-list {
  min-width: 12rem;
}

.provisioning-history-toggle {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.server-card.is-checked {
  border-color: color-mix(in srgb, var(--accent-2) 52%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-2) 30%, transparent);
}

.server-card-select {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  cursor: pointer;
}

/* Per-card provisioning progress */
.server-card-progress {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.server-card-progress.is-running {
  border-color: var(--ag-info-border);
  background: var(--ag-info-bg);
}

.server-card-progress.is-complete {
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

.server-card-progress.is-failed {
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

.server-card-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.server-card-progress-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}

.server-card-progress-percent {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.server-card-progress-bar {
  height: 0.25rem;
  overflow: hidden;
  background: var(--border);
  border-radius: 99px;
}

.server-card-progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent-2);
  border-radius: inherit;
  transition: width 220ms ease;
}

.server-card-phase-chips {
  display: flex;
  align-items: center;
  gap: 0.32rem;
}

.server-card-phase-chip {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.server-card-phase-chip .ag-icon {
  width: 0.72rem;
  height: 0.72rem;
}

.server-card-phase-chip.is-current {
  color: var(--accent-2);
  background: var(--ag-info-bg);
  border-color: var(--ag-info-border);
}

.server-card-phase-chip.is-complete {
  color: var(--cpa);
  background: var(--ag-ok-bg);
  border-color: var(--ag-ok-border);
}

.server-card-phase-chip.is-failed {
  color: var(--danger);
  background: var(--ag-danger-bg);
  border-color: var(--ag-danger-border);
}

.server-card-progress-msg {
  margin: 0;
  overflow: hidden;
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.server-card-progress-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  color: var(--accent-2);
  background: none;
  border: none;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.server-card-progress-link .ag-icon {
  width: 0.8rem;
  height: 0.8rem;
}

.server-card-progress-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ============================================================
   Proxy page: parallel per-VPS testing + batch copy to fleet
   (feature-scoped block appended for ProxyLive)
   ============================================================ */

/* Batch "copy a list to the fleet" destination picker, shown as a distinct
   control below the single-target upload dropdown in the proxy lists header. */
.px3-fleet-copy-control {
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.px3-fleet-copy-control .px2-server-picker {
  margin-top: 0.4rem;
  max-height: 160px;
  overflow-y: auto;
}

/* API key fleet ----------------------------------------------------------- */
.ak-fleet {
  display: grid;
  gap: 1.1rem;
}

.ak-hero {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: clamp(1.35rem, 2.4vw, 2.15rem);
  background:
    radial-gradient(circle at 84% -30%, rgba(229, 176, 110, 0.2), transparent 19rem),
    linear-gradient(135deg, color-mix(in srgb, var(--panel-3) 92%, #0f1115), var(--panel));
  border: 1px solid color-mix(in srgb, var(--border) 78%, var(--accent));
  border-radius: 16px;
  box-shadow: 0 22px 60px color-mix(in srgb, var(--shadow) 45%, transparent);
}

.ak-hero::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--accent-2));
}

.ak-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent-2);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ak-hero h1,
.ak-panel-head h2,
.ak-config h2,
.ak-results-bar h2,
.ak-archive h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.035em;
}

.ak-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 0.98;
}

.ak-hero p {
  max-width: 46rem;
  margin: 0.65rem 0 0;
  color: var(--text-dim);
  line-height: 1.55;
}

.ak-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(5.3rem, 1fr));
  flex: 0 1 32rem;
  gap: 1px;
  min-width: min(100%, 30rem);
  margin: 0;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.ak-hero-stats div {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
  background: color-mix(in srgb, var(--panel-2) 94%, transparent);
}

.ak-hero-stats dt,
.ak-card-metrics dt {
  color: var(--text-muted);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ak-hero-stats dd,
.ak-card-metrics dd {
  margin: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.ak-hero-stats .is-working dd {
  color: var(--cpa);
}

.ak-workspace-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  color: #8a5a12;
  background: color-mix(in srgb, #f5c26b 18%, var(--panel));
  border: 1px solid color-mix(in srgb, #f5c26b 45%, var(--border));
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.35;
}

.ak-workspace-banner .ag-icon {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: #b7791f;
}

.ak-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.ak-config,
.ak-fleet-panel,
.ak-results-bar {
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.ak-config {
  position: sticky;
  top: 5.25rem;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.ak-config > header,
.ak-panel-head,
.ak-results-bar > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ak-config > header > div,
.ak-panel-head > div:first-child,
.ak-results-bar > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.ak-config h2,
.ak-panel-head h2,
.ak-results-bar h2,
.ak-archive h2 {
  font-size: 1.02rem;
}

.ak-step {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--accent-2);
  background: var(--ag-info-bg);
  border: 1px solid var(--ag-info-border);
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ak-config .ns-field {
  margin: 0;
}

.ak-config .ns-field textarea {
  min-height: 0;
  resize: vertical;
}

.ak-inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.ak-field-label {
  display: grid;
  gap: 0.16rem;
  margin-bottom: 0.45rem;
}

.ak-field-label > span,
.ak-advanced-lists summary {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
}

.ak-field-label small,
.ak-advanced-lists > p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.67rem;
  line-height: 1.35;
}

.ak-choice-list {
  display: grid;
  gap: 0.35rem;
  max-height: 12rem;
  overflow: auto;
  padding-right: 0.15rem;
}

.ak-choice-list label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.55rem 0.62rem;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.ak-choice-list label:has(input:checked) {
  background: var(--ag-info-bg);
  border-color: var(--ag-info-border);
}

.ak-choice-list label > span {
  display: grid;
  min-width: 0;
}

.ak-choice-list strong,
.ak-choice-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ak-choice-list strong {
  color: var(--text);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.7rem;
}

.ak-choice-list small {
  color: var(--text-muted);
  font-size: 0.62rem;
}

.ak-inline-empty {
  padding: 0.7rem;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--panel-2) 72%, transparent);
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 0.7rem;
  line-height: 1.45;
}

.ak-advanced-lists {
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.ak-advanced-lists summary {
  cursor: pointer;
}

.ak-advanced-lists > p {
  margin: 0.45rem 0 0.65rem;
}

.ak-fleet-panel {
  min-width: 0;
  padding: 1rem;
}

.ak-panel-head {
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.ak-panel-head p,
.ak-results-bar p {
  margin: 0.18rem 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.ak-panel-actions,
.ak-result-actions,
.ak-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ak-panel-actions button,
.ak-result-actions button,
.ak-card-actions button,
.ak-save-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.ak-panel-actions .ag-icon,
.ak-result-actions .ag-icon,
.ak-card-actions .ag-icon,
.ak-save-list .ag-icon,
.ak-launch .ag-icon {
  width: 0.85rem;
  height: 0.85rem;
}

.ak-server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 0.75rem;
}

.ak-server-card {
  position: relative;
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.85rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel-2) 84%, transparent);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.ak-server-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  content: "";
  background: var(--server-color);
  opacity: 0.48;
}

.ak-server-card.is-selected {
  background: color-mix(in srgb, var(--panel-2) 88%, var(--server-color) 12%);
  border-color: color-mix(in srgb, var(--server-color) 55%, var(--border));
}

.ak-server-card.is-active {
  border-color: var(--ag-info-border);
}

.ak-server-card.is-success {
  border-color: var(--ag-ok-border);
}

.ak-server-card.is-failed {
  border-color: var(--ag-danger-border);
}

.ak-server-card.is-offline {
  opacity: 0.62;
}

.ak-server-head,
.ak-progress-copy,
.ak-launch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.ak-server-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  cursor: pointer;
}

.ak-server-select > i {
  flex: 0 0 auto;
  width: 0.52rem;
  height: 0.52rem;
  background: var(--server-color);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--server-color) 15%, transparent);
}

.ak-server-select > span {
  display: grid;
  min-width: 0;
}

.ak-server-select strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ak-server-select small {
  color: var(--text-muted);
  font-size: 0.61rem;
}

.ak-status {
  flex: 0 0 auto;
  padding: 0.22rem 0.42rem;
  color: var(--text-muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.57rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ak-status.is-active {
  color: var(--accent-2);
  background: var(--ag-info-bg);
  border-color: var(--ag-info-border);
}

.ak-status.is-success {
  color: var(--cpa);
  background: var(--ag-ok-bg);
  border-color: var(--ag-ok-border);
}

.ak-status.is-failed {
  color: var(--danger);
  background: var(--ag-danger-bg);
  border-color: var(--ag-danger-border);
}

.ak-progress-copy {
  color: var(--text-muted);
  font-size: 0.67rem;
}

.ak-progress-copy strong {
  color: var(--text);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.ak-progress {
  height: 0.3rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--border) 75%, transparent);
  border-radius: 99px;
}

.ak-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--server-color), var(--accent-2));
  border-radius: inherit;
  transition: width 220ms ease;
}

.ak-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ak-card-metrics div {
  display: grid;
  gap: 0.18rem;
  padding: 0.52rem;
  background: var(--panel);
}

.ak-card-metrics dd {
  font-size: 0.76rem;
}

.ak-card-error {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  padding: 0.55rem;
  color: var(--danger);
  background: var(--ag-danger-bg);
  border: 1px solid var(--ag-danger-border);
  border-radius: 7px;
  font-size: 0.66rem;
  line-height: 1.4;
}

.ak-card-error .ag-icon {
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
}

.ak-url-preview {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.ak-url-preview code {
  overflow: hidden;
  padding: 0.28rem 0.4rem;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--panel-3) 80%, transparent);
  border-radius: 5px;
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ak-url-preview small,
.ak-card-empty {
  color: var(--text-muted);
  font-size: 0.62rem;
}

.ak-card-empty {
  display: grid;
  min-height: 2.15rem;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 7px;
}

.ak-card-actions {
  align-self: end;
  padding-top: 0.1rem;
}

.ak-card-actions .resource-action {
  min-height: 2rem;
}

.ak-launch-bar {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.ak-launch-bar > div {
  display: grid;
  gap: 0.12rem;
}

.ak-launch-bar strong {
  color: var(--text);
  font-size: 0.76rem;
}

.ak-launch-bar span {
  color: var(--text-muted);
  font-size: 0.66rem;
}

.ak-launch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  padding-inline: 1rem;
}

.ak-fleet-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 13rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.ak-fleet-empty .ag-icon {
  width: 1.6rem;
  height: 1.6rem;
}

.ak-fleet-empty > div {
  display: grid;
  gap: 0.15rem;
}

.ak-fleet-empty strong {
  color: var(--text);
}

.ak-fleet-empty span {
  font-size: 0.7rem;
}

.ak-results-bar {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) auto minmax(17rem, 23rem);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.ak-result-actions {
  justify-content: center;
}

.ak-result-actions .resource-action {
  min-height: 2rem;
}

.ak-result-actions .is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.ak-save-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}

.ak-save-list .ns-field {
  min-width: 0;
  margin: 0;
}

.ak-save-list button {
  min-height: 2.25rem;
}

.ak-archive {
  overflow: hidden;
}

.ak-archive .card-header > div:first-child {
  display: grid;
  gap: 0.05rem;
}

@media (max-width: 1180px) {
  .ak-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .ak-hero-stats {
    flex-basis: auto;
  }

  .ak-workspace {
    grid-template-columns: 1fr;
  }

  .ak-config {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .ak-config > header,
  .ak-config > .ak-inline-fields,
  .ak-config > .ak-advanced-lists {
    grid-column: 1 / -1;
  }

  .ak-results-bar {
    grid-template-columns: 1fr 1fr;
  }

  .ak-save-list {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .ak-hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .ak-config {
    grid-template-columns: 1fr;
  }

  .ak-config > header,
  .ak-config > .ak-inline-fields,
  .ak-config > .ak-advanced-lists {
    grid-column: auto;
  }

  .ak-inline-fields,
  .ak-results-bar,
  .ak-save-list {
    grid-template-columns: 1fr;
  }

  .ak-panel-head,
  .ak-launch-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .ak-panel-actions,
  .ak-result-actions {
    justify-content: flex-start;
  }

  .ak-launch {
    width: 100%;
  }
}

/* SSH brute fleet launch / shard enhancements */
.ssh-brute-config-group {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ssh-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 48%, transparent);
}

.ssh-brute-config-group .launch-control-grid,
.ssh-brute-config-group .ssh-brute-proxy-row {
  gap: 0.55rem;
}

.ssh-brute-fleet-config {
  position: relative;
  max-height: 70vh;
  overflow-y: auto;
  padding-bottom: 4.5rem;
}

.ssh-fleet-launch-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  margin: 0 -1rem -1rem;
  border-top: 1px solid var(--ssh-line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(6px);
}

.ssh-fleet-run-header p .ssh-run-stat {
  font-weight: 800;
  color: var(--text);
}

.ssh-shard-health {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.38rem;
  border: 1px solid var(--ssh-line);
  border-radius: 999px;
  font-size: 0.54rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.ssh-shard-health i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
}

.ssh-shard-health-ok {
  color: var(--ok);
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

.ssh-shard-health-ok i { background: var(--ok); }

.ssh-shard-health-unreachable {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

.ssh-shard-health-unreachable i { background: var(--danger); }

.ssh-shard-health-issues {
  color: var(--warning);
  border-color: var(--ag-warning-border);
  background: var(--ag-warning-bg);
}

.ssh-shard-health-issues i { background: var(--warning); }

.ssh-fleet-shard-progress-compact {
  margin-top: 0.55rem;
  gap: 0.22rem;
}

.ssh-fleet-shard-progress-compact .progress-track {
  height: 0.22rem;
}

.ssh-fleet-shard-error-prominent {
  padding: 0.55rem 0.65rem;
  border-left-width: 3px;
  border-left-style: solid;
  border-left-color: var(--danger);
  font-weight: 700;
}

.ssh-fleet-shard > footer button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .ssh-brute-fleet-config {
    max-height: none;
    padding-bottom: 1rem;
  }

  .ssh-fleet-launch-footer {
    position: static;
    margin: 0;
    padding: 0.75rem 0;
    background: transparent;
    backdrop-filter: none;
  }
}

/* SSH instance lists: bulk sync, expandable sync details, and sticky editor */
.ssh-instance-workspace {
  align-items: start;
}

.ssh-instance-editor {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.batch-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.batch-action-row button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.fleet-coverage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.fleet-coverage-pill .ag-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: var(--text-muted);
}

.fleet-coverage-pill:hover .ag-icon {
  color: var(--accent-2);
}

.sync-details-row td {
  padding: 0;
  border-top: 1px solid var(--ssh-line);
  background: color-mix(in srgb, var(--panel-2) 55%, transparent);
}

.sync-details {
  padding: 0.85rem 1rem;
}

.sync-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.sync-details-head strong {
  font-size: 0.78rem;
  font-weight: 850;
}

.sync-details-empty {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.sync-details-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sync-details-list li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.45rem;
  align-items: center;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--ssh-line);
  border-radius: 7px;
  background: var(--panel);
  font-size: 0.72rem;
}

.sync-server-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--server-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--server-color) 15%, transparent);
}

.sync-server-name {
  color: var(--text);
  font-weight: 800;
}

.sync-status-badge {
  justify-self: start;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sync-details-list li.is-succeeded .sync-status-badge {
  color: var(--cpa);
  background: var(--ag-ok-bg);
  border: 1px solid var(--ag-ok-border);
}

.sync-details-list li.is-failed .sync-status-badge {
  color: var(--danger);
  background: var(--ag-danger-bg);
  border: 1px solid var(--ag-danger-border);
}

.sync-details-list li.is-pending .sync-status-badge {
  color: var(--accent-2);
  background: var(--ag-warning-bg);
  border: 1px solid var(--ag-warning-border);
}

.sync-last-error {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--danger);
  font-size: 0.65rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .ssh-instance-editor {
    position: static;
    align-self: auto;
  }

  .batch-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .batch-action-row button {
    width: 100%;
    justify-content: center;
  }
}

/* ===== SSH scan launch panel + shard enhancements ===== */
.ss-section {
  display: grid;
  gap: 0.55rem;
}

.ss-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.ss-section-title {
  margin: 0;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ss-section-fleet .fleet-scope-summary {
  min-width: 13rem;
}

.ss-section-fleet .fleet-scope-copy strong {
  font: 850 0.9rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ss-section-fleet .fleet-scope-copy strong.is-warn {
  color: var(--warning);
}

.ss-launch-bar {
  position: sticky;
  bottom: 0.5rem;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem 0.75rem;
  align-items: center;
  margin-top: 0.1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 10px 34px color-mix(in srgb, var(--shadow) 55%, transparent);
}

.ss-action-text {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
  cursor: default;
  pointer-events: none;
}

.ss-run.is-expanded .ss-run-head {
  border-bottom: 1px solid var(--ss-line);
}

.ss-shard-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  justify-content: flex-end;
}

.ssh-shard-health {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.15rem 0.42rem;
  border: 1px solid var(--ss-line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text-muted);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.ssh-shard-health-dot {
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: currentColor;
}

.ssh-shard-health-ok {
  color: var(--ok);
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

.ssh-shard-health-unreachable {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

.ssh-shard-health-issues {
  color: var(--warning);
  border-color: var(--ag-warning-border);
  background: var(--ag-warning-bg);
}

.ss-shard-error.is-prominent {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.5rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  -webkit-line-clamp: unset;
}

.ss-shard-error.is-prominent .ag-icon {
  flex: none;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.08rem;
}

.ss-spinner {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ss-spin 0.75s linear infinite;
}

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

@media (max-width: 1100px) {
  .ss-section-fleet .fleet-scope-summary {
    min-width: 0;
    width: 100%;
  }

  .ss-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ss-config-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .ss-launch-bar {
    grid-template-columns: 1fr;
  }

  .ss-launch-cta {
    justify-content: stretch;
  }

  .ss-start-btn {
    width: 100%;
  }

  .ss-shard-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ss-shard-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}


/* SSH cracked credentials table */
.ssh-cracked-search {
  align-items: flex-end;
  flex-wrap: wrap;
}

.ssh-cracked-search .form-group {
  margin-bottom: 0;
}

.ssh-cracked-download {
  flex: 0 0 auto;
}

.ssh-cracked-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ssh-cracked-table th,
.ssh-cracked-table td {
  padding: 0.62rem 0.72rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.ssh-cracked-table th {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
}

.ssh-cracked-row:hover {
  background: color-mix(in srgb, var(--panel-2) 50%, transparent);
}

.ssh-cracked-cell {
  color: var(--text-dim);
}

.ssh-cracked-credential-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.ssh-cracked-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssh-cracked-password .ssh-cracked-value {
  color: var(--cpa);
}

.ssh-cracked-copy-btn {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  flex: none;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.ssh-cracked-copy-btn .ag-icon {
  width: 0.82rem;
  height: 0.82rem;
}

.ssh-cracked-copy-btn:hover,
.ssh-cracked-copy-btn:focus-visible {
  color: var(--accent-2);
  background: var(--panel-2);
  border-color: var(--border);
}

.ssh-cracked-copy-btn.is-copied {
  color: var(--ok);
  background: var(--ag-ok-bg);
  border-color: var(--ag-ok-border);
}

.ssh-cracked-instance-list .scan-source-item.compact-source {
  gap: 0.35rem;
}

.ssh-cracked-instance-list strong {
  color: var(--text);
  font-weight: 800;
}

.ssh-cracked-found {
  font-size: 0.76rem;
  white-space: nowrap;
}

.ssh-cracked-detail {
  background: color-mix(in srgb, var(--panel-2) 45%, transparent);
}

.ssh-cracked-detail > td {
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.ssh-cracked-detail-strip {
  margin: 0;
  padding: 0.85rem;
}

.ssh-cracked-origins strong {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.ssh-cracked-origins strong > span {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
}

/* Missing hero masks (2026-08-07 audit): without a mask-image the icon span
   renders as a solid background square. Self-contained: each class carries
   its own mask properties. */
.hero-exclamation-triangle,
.hero-clipboard-document,
.hero-computer-desktop,
.hero-forward,
.hero-inbox,
.hero-link,
.hero-lock-closed,
.hero-wrench-screwdriver,
.hero-arrow-path-rounded-square {
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.hero-exclamation-triangle {
  --hero-exclamation-triangle: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"/></svg>');
  -webkit-mask-image: var(--hero-exclamation-triangle);
  mask-image: var(--hero-exclamation-triangle);
}

.hero-clipboard-document {
  --hero-clipboard-document: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184m3.416 10.428h3m-3-4.5h3"/></svg>');
  -webkit-mask-image: var(--hero-clipboard-document);
  mask-image: var(--hero-clipboard-document);
}

.hero-computer-desktop {
  --hero-computer-desktop: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"/></svg>');
  -webkit-mask-image: var(--hero-computer-desktop);
  mask-image: var(--hero-computer-desktop);
}

.hero-forward {
  --hero-forward: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3 8.689c0-.864.933-1.406 1.683-.977l7.108 4.061a1.125 1.125 0 0 1 0 1.954l-7.108 4.061A1.125 1.125 0 0 1 3 16.811V8.69ZM12.75 8.689c0-.864.933-1.406 1.683-.977l7.108 4.061a1.125 1.125 0 0 1 0 1.954l-7.108 4.061a1.125 1.125 0 0 1-1.683-.977V8.69Z"/></svg>');
  -webkit-mask-image: var(--hero-forward);
  mask-image: var(--hero-forward);
}

.hero-inbox {
  --hero-inbox: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859m-19.5.338V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H6.911a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661Z"/></svg>');
  -webkit-mask-image: var(--hero-inbox);
  mask-image: var(--hero-inbox);
}

.hero-link {
  --hero-link: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.406 3.312a4.5 4.5 0 0 0-1.242-7.244l-4.5-4.5a4.5 4.5 0 0 0-6.364 6.364l1.757 1.757"/></svg>');
  -webkit-mask-image: var(--hero-link);
  mask-image: var(--hero-link);
}

.hero-lock-closed {
  --hero-lock-closed: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"/></svg>');
  -webkit-mask-image: var(--hero-lock-closed);
  mask-image: var(--hero-lock-closed);
}

.hero-wrench-screwdriver {
  --hero-wrench-screwdriver: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.42 15.17 17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437"/></svg>');
  -webkit-mask-image: var(--hero-wrench-screwdriver);
  mask-image: var(--hero-wrench-screwdriver);
}

.hero-arrow-path-rounded-square {
  --hero-arrow-path-rounded-square: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"/></svg>');
  -webkit-mask-image: var(--hero-arrow-path-rounded-square);
  mask-image: var(--hero-arrow-path-rounded-square);
}

/* Flash dismiss buttons (2026-08-07 audit ux-06). */
.flash-info button,
.flash-error button {
  margin-left: 0.75rem;
  background: none;
  border: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
.flash-info button:hover,
.flash-error button:hover { opacity: 1; }

/* Disabled export links outside .ak-result-actions (2026-08-07 audit ak-01). */
.resource-action.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* == ui-polish:scanner == */
/* Scanner (ScannerLive) light-touch card polish: run summary strip,
   run/shard headings, status chip color families, taller stage bars,
   loading skeletons, history tools. Appended block — wins by cascade order. */

/* Stage bars: taller, rounded, styled track (was 5px accent-color only). */
.sc-progress progress {
  width: 100%;
  height: 7px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 4px;
  background: #181714;
  accent-color: var(--server-color);
}
.sc-progress progress::-webkit-progress-bar { background: #181714; border-radius: 4px; }
.sc-progress progress::-webkit-progress-value { background: var(--server-color); border-radius: 4px; }
.sc-progress progress::-moz-progress-bar { background: var(--server-color); border-radius: 4px; }

/* Run heading: kicker + name + source subline (beats .sc-run-row > header > div). */
.sc-run-row > header > .sc-run-heading {
  display: grid;
  gap: 1px;
  align-items: stretch;
  min-width: 0;
  max-width: 44ch;
}

.sc-run-heading strong {
  color: #f2eee8;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-run-source {
  color: #8f887d;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Collapsed-run aggregate strip (beats .sc-run-row > header > div). */
.sc-run-row > header > .sc-run-summary {
  display: grid;
  gap: 6px;
  align-items: stretch;
  min-width: 360px;
  margin-left: auto;
}

.sc-run-summary dl {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
}

.sc-run-summary dt {
  color: #8f887d;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sc-run-summary dd {
  margin: 1px 0 0;
  color: #d9d2c7;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sc-run-summary dd small {
  color: #7d766b;
  font-size: 10px;
  font-weight: 700;
}

.sc-run-summary dd.is-hit, .sc-assignment dd.is-hit { color: #9ccc5d; }

.sc-run-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-run-bar {
  flex: 1;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 3px;
  background: #181714;
}

.sc-run-bar::-webkit-progress-bar { background: #181714; border-radius: 3px; }
.sc-run-bar::-webkit-progress-value { background: #e3a65f; border-radius: 3px; }
.sc-run-bar::-moz-progress-bar { background: #e3a65f; border-radius: 3px; }

/* Indeterminate: total_work not yet reported — soft sliding sheen. */
.sc-run-bar.is-unknown::-webkit-progress-bar {
  background: linear-gradient(90deg, #181714 25%, #2c2821 50%, #181714 75%);
  background-size: 200% 100%;
  animation: sc-sheen 1.6s linear infinite;
}
.sc-run-bar.is-unknown::-moz-progress-bar { background: transparent; }

@keyframes sc-sheen {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.sc-run-bar-row b {
  min-width: 3.2ch;
  color: #a49c91;
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Status chips — extend the base em styles with color families. */
.sc-run-row > header em.sc-chip,
.sc-assignment > header em.sc-chip {
  padding: 4px 8px;
  border: 1px solid #4a443b;
  border-radius: 7px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sc-chip.is-ok {
  color: #a3cf9a;
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

.sc-chip.is-active {
  color: #9ccc5d;
  border-color: rgba(156, 204, 93, 0.45);
  background: rgba(156, 204, 93, 0.12);
  animation: sc-chip-pulse 2.2s ease-in-out infinite;
}

@keyframes sc-chip-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(156, 204, 93, 0); }
  50% { box-shadow: 0 0 0 3px rgba(156, 204, 93, 0.14); }
}

.sc-chip.is-pending {
  color: #d8c391;
  border-color: #5a5040;
  background: #2b2820;
}

.sc-chip.is-warn {
  color: #f0bc7d;
  border-color: var(--ag-warning-border);
  background: var(--ag-warning-bg);
}

.sc-chip.is-stale {
  color: #e3a65f;
  border-style: dashed;
  border-color: var(--ag-warning-border);
  background: transparent;
}

.sc-chip.is-bad {
  color: #ff927f;
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

.sc-chip.is-muted {
  color: #9d968a;
  border-color: #4a443b;
  background: transparent;
}

/* Shard heading: name + targets/attempt/updated subline. */
.sc-assignment > header > .sc-shard-heading {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sc-shard-heading strong {
  color: #eae5dd;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-shard-heading small {
  color: #8f887d;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Promoted crack-import alarm in the shard header. */
.sc-assignment > header em.sc-import-chip {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sc-import-chip.is-debt {
  color: #e3a65f;
  border: 1px solid var(--ag-warning-border);
  background: var(--ag-warning-bg);
}

.sc-import-chip.is-rejected {
  color: #ff927f;
  border: 1px solid var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

/* Import chip keeps the base auto right-push; a following status chip sits
   directly beside it instead of claiming its own margin. */
.sc-assignment > header em.sc-import-chip + em.sc-chip { margin-left: 0; }

/* Disabled shard actions: explain + mute (title carries the reason). */
.sc-actions button.sc-action-offline,
.sc-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  border-style: dashed;
}

/* Disabled export preview (affordance before the run qualifies). */
.sc-result-action.is-preview:disabled {
  cursor: help;
  opacity: 0.55;
  border-style: dashed;
}

/* Runs-history tools (expand all / collapse all). */
.sc-history-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-history-toggle {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #4a443b;
  border-radius: 7px;
  color: #c7bfb4;
  background: #1b1a17;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sc-history-toggle:hover:not(:disabled) {
  border-color: #887057;
  background: #2c2821;
}

.sc-history-toggle:disabled { cursor: not-allowed; opacity: 0.45; }

/* Loading skeleton rows (suppress the false empty state on first paint). */
.sc-runs-loading { display: grid; }

.sc-skeleton-row {
  height: 54px;
  border-top: 1px solid #37332d;
  background: linear-gradient(90deg, #25231e 25%, #2c2a24 50%, #25231e 75%);
  background-size: 200% 100%;
  animation: sc-sheen 1.5s linear infinite;
}

.sc-skeleton-row:first-child { border-top: 0; }

/* Zero-assignment placeholder inside an expanded run (spans the full grid). */
.sc-no-assignments {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border: 1px dashed #4a443b;
  border-radius: 8px;
  color: #918a80;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 760px) {
  .sc-run-row > header > .sc-run-heading { width: 100%; max-width: none; }
  .sc-run-row > header > .sc-run-summary { width: 100%; margin-left: 0; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-run-bar.is-unknown::-webkit-progress-bar,
  .sc-skeleton-row { animation: none; }
  .sc-chip.is-active { animation: none; }
}
/* == /ui-polish:scanner == */

/* == ui-polish:apikeys == */
/* API keys page polish (2026-08-08). Appended block: radios, banner variants,
   launch bar, archive filters/sort, key-cell reveal+copy, density, skeletons,
   two-step destructive actions. */

/* Radio .ag-check controls: the base rules above only match checkboxes. */
input[type="radio"].ag-check {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 20px;
  min-width: 20px;
  height: 20px;
  color: #17130f;
  background: var(--panel-2);
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  vertical-align: middle;
}

input[type="radio"].ag-check:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

input[type="radio"].ag-check:checked::after {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  content: "";
  transform: none;
}

input[type="radio"].ag-check:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Disabled export actions are inert spans now; keep them unselectable too. */
.resource-action.is-disabled { user-select: none; }

/* Workspace banner variants (base shell keeps structural rules). */
.ak-workspace-banner--warning {
  color: #8a5a12;
  background: color-mix(in srgb, #f5c26b 18%, var(--panel));
  border-color: color-mix(in srgb, #f5c26b 45%, var(--border));
}

.ak-workspace-banner--warning .ag-icon { color: #b7791f; }

.ak-workspace-banner--info {
  color: var(--text-dim);
  background: var(--ag-info-bg);
  border-color: var(--ag-info-border);
}

.ak-workspace-banner--info .ag-icon { color: var(--accent); }

/* Product picker — segmented radios. */
.ak-product-radios {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: none;
  padding-right: 0;
}

.ak-product-radios label { align-items: flex-start; }

.ak-product-radios label.is-active {
  background: var(--ag-info-bg);
  border-color: var(--ag-info-border);
  box-shadow: inset 2px 0 0 var(--accent-2);
}

/* Product list groups — active vs inactive. */
.ak-product-list-groups {
  display: grid;
  gap: 0.5rem;
}

.ak-product-list-group {
  display: grid;
  gap: 0.5rem;
  padding: 0.6rem;
  border: 1px dashed var(--border);
  border-radius: 9px;
  opacity: 0.55;
  transition: opacity 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ak-product-list-group.is-active {
  background: color-mix(in srgb, var(--ag-info-bg) 55%, transparent);
  border: 1px solid var(--ag-info-border);
  opacity: 1;
}

.ak-product-list-group > header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ak-product-list-group > header strong {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
}

.ak-product-list-group > header small {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.62rem;
}

/* Launch bar — summary / shard toggle card / action. */
.ak-launch-bar { gap: 1rem; }

.ak-launch-summary {
  display: grid;
  flex: 1 1 auto;
  gap: 0.12rem;
  min-width: 0;
}

.ak-launch-busy-hint { color: var(--accent-2); }

.ak-shard-toggle {
  display: flex;
  align-items: center;
  flex: 0 1 19rem;
  gap: 0.6rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.ak-shard-toggle:has(input:checked) {
  background: var(--ag-info-bg);
  border-color: var(--ag-info-border);
}

.ak-shard-toggle > span {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.ak-shard-toggle strong {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 850;
}

.ak-shard-toggle small {
  color: var(--text-muted);
  font-size: 0.6rem;
  line-height: 1.35;
}

/* Archive filter bar. */
.ak-archive-filters {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 10.5rem 12rem;
  align-items: end;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.ak-archive-filters .ns-field { margin: 0; }

/* Sortable header buttons. */
.ak-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 3px;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.ak-sort:hover { color: var(--text); }

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

.ak-sort.is-active { color: var(--accent-2); }

/* Meta pills (error kind / HTTP) — outline, not status-colored. */
.pill.outline {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
}

/* Key cell — masked value + reveal/copy. */
.ak-key-cell { white-space: nowrap; }

.ak-key-value {
  display: inline-block;
  max-width: 15rem;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.ak-key-btn {
  display: inline-grid;
  width: 1.55rem;
  height: 1.55rem;
  margin-left: 0.2rem;
  padding: 0;
  place-items: center;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  vertical-align: middle;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.ak-key-btn .ag-icon { width: 0.82rem; height: 0.82rem; }

.ak-key-btn:hover,
.ak-key-btn:focus-visible {
  color: var(--accent-2);
  background: var(--panel-2);
  border-color: var(--border);
}

.ak-key-btn.is-copied {
  color: var(--cpa);
  background: var(--ag-ok-bg);
  border-color: var(--ag-ok-border);
}

/* Dense, truncating cells. */
.ak-cell-endpoint,
.ak-cell-sample { max-width: 0; } /* enables ellipsis inside table-cell */

.ak-ellipsis {
  display: inline-block;
  max-width: 22rem;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.ak-cell-sample .ak-ellipsis { max-width: 16rem; }

.ak-cell-sample .pill.outline { margin-left: 0.3rem; }

.ak-cell-checked {
  font-size: 0.72rem;
  white-space: nowrap;
}

.ak-cell-error {
  max-width: 22rem;
  overflow: hidden;
  margin-top: 0.15rem;
  color: var(--danger);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ak-none { color: var(--text-muted); }

/* Row actions — armed delete. */
.ak-row-actions { white-space: nowrap; }

.resource-action.is-armed {
  color: var(--danger);
  background: var(--ag-danger-bg);
  border-color: var(--danger);
  animation: ak-armed-pulse 1s ease-in-out infinite;
}

@keyframes ak-armed-pulse {
  50% { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
}

/* Archive loading skeleton. */
.ak-skeleton-table {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 0.65rem;
}

.ak-skeleton-table p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-align: center;
}

.ak-skeleton-row {
  display: grid;
  grid-template-columns: 5rem 1fr 9rem 6rem;
  gap: 0.6rem;
}

.ak-skeleton-row i {
  height: 0.85rem;
  background: linear-gradient(
    90deg,
    var(--panel-2) 25%,
    var(--surface-raised) 50%,
    var(--panel-2) 75%
  );
  background-size: 200% 100%;
  border-radius: 4px;
  animation: ak-shimmer 1.4s linear infinite;
}

@keyframes ak-shimmer {
  to { background-position: -200% 0; }
}

/* Archive error in context. */
.ak-archive-error {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.8rem;
  color: var(--danger);
  background: var(--ag-danger-bg);
  border: 1px solid var(--ag-danger-border);
  border-radius: 9px;
  font-size: 0.78rem;
}

.ak-archive-error .ag-icon { flex: 0 0 auto; }

.ak-archive-error span { flex: 1 1 18rem; }

.ak-archive-error button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Copy feedback states (label-scoped CopyResults swaps). */
.ak-result-actions .is-copied,
.ak-card-actions .is-copied {
  color: var(--cpa);
  border-color: var(--ag-ok-border);
}

.ak-result-actions .is-copy-failed,
.ak-card-actions .is-copy-failed {
  color: var(--danger);
  border-color: var(--ag-danger-border);
}

@media (max-width: 720px) {
  .ak-archive-filters { grid-template-columns: 1fr; }
  .ak-product-radios { grid-template-columns: 1fr; }
  .ak-shard-toggle { flex-basis: auto; width: 100%; }
  .ak-skeleton-row { grid-template-columns: 3rem 1fr; }
  .ak-skeleton-row i:nth-child(n+3) { display: none; }
}
/* == /ui-polish:apikeys == */

/* == ui-polish:proxies == */
/* ============================================================
   Proxies page polish (px-04): icon masks, spin utility, pills,
   card density, target picker, busy/stale states
   ============================================================ */

.hero-server,
.hero-arrow-right {
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.hero-server {
  --hero-server: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 17.25v-.228a4.5 4.5 0 0 0-.12-1.03l-2.268-9.64a3.375 3.375 0 0 0-3.285-2.602H7.923a3.375 3.375 0 0 0-3.285 2.602l-2.268 9.64a4.5 4.5 0 0 0-.12 1.03v.228m19.5 0a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3m19.5 0a3 3 0 0 0-3-3H5.25a3 3 0 0 0-3 3m16.5 0h.008v.008h-.008v-.008Zm-3 0h.008v.008h-.008v-.008Z"/></svg>');
  -webkit-mask-image: var(--hero-server);
  mask-image: var(--hero-server);
}

.hero-arrow-right {
  --hero-arrow-right: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"/></svg>');
  -webkit-mask-image: var(--hero-arrow-right);
  mask-image: var(--hero-arrow-right);
}

.spin { animation: ag-spin 0.9s linear infinite; }
@keyframes ag-spin { to { transform: rotate(360deg); } }

.pill.slate {
  color: #a7b0bc;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.px3-skeleton-inline { display: inline-block; width: 44px; height: 15px; vertical-align: middle; }

.px3-card-head-side { display: flex; flex: none; align-items: center; gap: 8px; }

.px3-target-toggle {
  min-height: 23px;
  padding: 0 8px;
  color: #8f887e;
  border: 1px dashed #4b453c;
  border-radius: 6px;
  background: transparent;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.px3-target-toggle:hover:not(:disabled) { color: #e5c08a; border-color: #8a6b45; }

.px3-target-toggle.is-active {
  color: #201811;
  border: 1px solid #d39755;
  background: #dca05d;
}

.px3-target-toggle:disabled { opacity: 0.4; cursor: not-allowed; }

.px3-health-metrics > div.disabled {
  grid-column: 1 / -1;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 12px;
}

.px3-health-metrics .disabled dd { color: #a7b0bc; font-size: 12px; }

.px3-test-finished {
  display: block;
  margin-top: 2px;
  color: #7f786e;
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.px2-scope-control button:disabled,
.px2-publication-scope button:disabled { opacity: 0.4; cursor: not-allowed; }

.px2-publication-scope button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.px3-gate-hint { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: #b08c5a; font-size: 10px; }
.px3-gate-hint .ag-icon { width: 12px; height: 12px; flex: none; }

.px3-inline-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d9a366;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.px3-inline-refresh .ag-icon { width: 12px; height: 12px; }

.px3-lists-table[aria-busy="true"] tbody { opacity: 0.55; transition: opacity 160ms ease; }

.px3-dash { color: #6f685f; }

.px3-rows-count { color: var(--text-muted); font-size: 11px; }

.px3-proxy-rows td.px3-cell-list,
.px3-proxy-rows td.px3-cell-raw { font-size: 12px; }

.px3-proxy-rows td.px3-cell-protocol {
  color: #b7afa4;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.px3-proxy-rows td.px3-cell-latency { font-size: 12px; font-variant-numeric: tabular-nums; }
.px3-proxy-rows td.px3-cell-time,
.proxy-detail-table td.px3-cell-time { color: var(--text-muted); font-size: 11px; }

.px3-banner { margin: 0 0 12px; border: 1px solid #5a3a33; border-radius: 9px; }
.px3-card-notice em { font-style: normal; opacity: 0.85; }
/* == /ui-polish:proxies == */

/* == ui-polish:wordlists == */

/* Global busy spinner (self-contained copy; the page's icons use `.spin`
   outside `.sc-shell`). */
.spin { animation: ag-spin 0.9s linear infinite; }
@keyframes ag-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* Sort-arrow icons missing from the shared icon set. */
.hero-arrow-down,
.hero-arrow-up {
  width: 1em;
  height: 1em;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: -0.125em;
}
.hero-arrow-down {
  --hero-arrow-down: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"/></svg>');
  -webkit-mask-image: var(--hero-arrow-down);
  mask-image: var(--hero-arrow-down);
}
.hero-arrow-up {
  --hero-arrow-up: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"/></svg>');
  -webkit-mask-image: var(--hero-arrow-up);
  mask-image: var(--hero-arrow-up);
}

/* Hero shell — mirrors .px2-command-center since this page has no wrapper. */
.wl-hero {
  overflow: hidden;
  margin: 12px 0 14px;
  border: 1px solid #3b3730;
  border-radius: 14px;
  background: #1c1b18;
}
.wl-totals { min-width: 440px; grid-template-columns: repeat(4, minmax(96px, 1fr)); }
.wl-total-name {
  overflow: hidden;
  max-width: 100%;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shared micro kicker. */
.wl-kicker {
  display: block;
  color: #e4a55e;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Scope toolbar. */
.wl-scope-toolbar { flex-wrap: wrap; }
.wl-scope-label { display: grid; flex: none; gap: 5px; }
.wl-scope-toolbar > p { flex: 1 1 220px; }
.wl-scope-warning {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 9px;
  color: #e7b36e;
  border: 1px solid #6f5530;
  border-radius: 7px;
  background: rgba(231, 179, 110, 0.08);
  font-size: 10px;
  font-weight: 750;
}
.wl-scope-warning .ag-icon { width: 13px; height: 13px; }

/* Operations panel refinements. */
.resource-operation-sha {
  color: #817a70;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.resource-operation-sha code { margin-left: 4px; font-size: 10px; text-transform: none; }
.resource-operation-time { margin-left: auto; color: #817a70; font-size: 10px; }
.fleet-resource-operation > header > button { margin-left: 0; }
.fleet-resource-operation > header > button.resource-operation-dismiss {
  display: inline-flex;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #817a70;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}
.fleet-resource-operation > header > button.resource-operation-dismiss:hover {
  color: #ded8cf;
  border-color: #4a443b;
  background: #292724;
}
.resource-operation-dismiss .ag-icon { width: 12px; height: 12px; }
.wl-target-error {
  display: block;
  max-width: 260px;
  overflow: hidden;
  margin-top: 2px;
  color: #ef9680;
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Distribute control in the list card header. */
.wl-distribute-control { display: grid; justify-items: end; gap: 5px; }
.wl-distribute-control > span { max-width: 240px; color: #948d82; font-size: 11px; text-align: right; }
.wl-distribute-control > span strong { color: #ded8cf; }
.wl-no-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e7b36e;
  font-size: 11px;
  font-weight: 750;
}
.wl-no-source .ag-icon { width: 13px; height: 13px; }
.wl-distribute-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.wl-distribute-fieldset:disabled select { opacity: 0.5; cursor: not-allowed; }

/* Table tools row (filter + meta). */
.wl-table-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.wl-filter-form { margin: 0; }
.wl-filter-input { width: 220px; min-height: 32px; margin: 0; font-size: 12px; }
.wl-table-meta { margin-left: auto; color: #817a70; font-size: 10px; white-space: nowrap; }

/* Wordlist table. */
.wl-table th { letter-spacing: 0.04em; text-transform: uppercase; }
.wl-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  color: inherit;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.wl-sort-button:hover { color: #e4a55e; }
.wl-sort-button .ag-icon { width: 11px; height: 11px; }
.wl-count-col { text-align: right; }
.wl-count-col .wl-sort-button { margin-left: auto; }
.wl-name-cell { max-width: 220px; font-size: 12px; font-weight: 750; }
.wl-name-cell > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-count-cell { color: #e5b06e; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.wl-sha-cell { color: #817a70; font-size: 11px; }
.wl-copy-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  color: inherit;
  border: 0;
  border-radius: 5px;
  background: none;
  font: inherit;
  cursor: copy;
}
.wl-copy-button:hover { color: #ded8cf; background: #292724; }
.wl-copy-button.is-copied { color: #8bc58b; }
.wl-copy-button .ag-icon { width: 11px; height: 11px; }
.wl-actions-col { width: 1%; white-space: nowrap; }
.wl-table tbody tr.is-selected td { background: rgba(229, 167, 95, 0.08); }
.wl-table tbody tr.is-selected td:first-child { box-shadow: inset 2px 0 0 #e5a75f; }
.wl-table tbody tr.is-loading td { opacity: 0.6; }

/* Row actions. */
.wl-row-actions { flex-wrap: nowrap; justify-content: flex-end; }
.wl-distribute-action { min-width: 96px; border-color: color-mix(in srgb, #e5a75f 55%, #3d3932); }
.wl-distribute-action:not(:disabled):hover { color: #17130f; border-color: #e5a75f; background: #e5a75f; }
.wl-row-actions .resource-action:disabled { opacity: 0.45; cursor: not-allowed; }

/* Table footer (pagination + page size). */
.wl-table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wl-table-footer .pagination-bar { flex: 1; }
.wl-page-size-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.wl-page-size-form label { margin: 0; color: #817a70; font-size: 10px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.wl-page-size-form select { min-height: 30px; margin: 0; padding: 0 8px; font-size: 11px; }

/* Empty / error / loading states. */
.wl-empty { display: grid; justify-items: center; gap: 6px; padding: 2.6rem 2.2rem; }
.wl-empty-icon { width: 26px; height: 26px; color: #817a70; }
.wl-empty-error .wl-empty-icon { color: #e7b36e; }
.wl-empty-title { margin: 0; color: #ded8cf; font-size: 13px; font-weight: 850; }
.wl-empty p { margin: 0; max-width: 420px; font-size: 11.5px; }
.wl-empty-actions { display: flex; gap: 8px; margin-top: 8px; }
.wl-empty-note { color: #817a70 !important; font-size: 10px !important; }
.wl-clear-filter {
  padding: 0;
  color: #e4a55e;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-decoration: underline;
}

/* Skeleton shimmer — reuses the existing ag-fleet-skeleton keyframe. */
.wl-skeleton {
  height: 12px;
  border-radius: 5px;
  background: linear-gradient(90deg, #292724, #322f2b, #292724);
  background-size: 220% 100%;
  animation: ag-fleet-skeleton 1.6s linear infinite;
}
.wl-skel-name { width: 65%; }
.wl-skel-count { width: 36px; margin-left: auto; }
.wl-skel-sha { width: 88px; }
.wl-skel-type { width: 54px; }
.wl-skel-actions { width: 196px; margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .wl-skeleton { animation: none; } }

/* Preview card. */
.wl-preview-card { border-color: color-mix(in srgb, #e5a75f 38%, #3b3730); }
.wl-preview-name { color: #ded8cf; font-size: 12px; }
.wl-preview-card .proxy-list-card-title { flex-wrap: wrap; }
.wl-preview-list { max-height: 300px; }
.wl-preview-list th:first-child, .wl-preview-list td:first-child { width: 44px; }
.wl-preview-list td { font-size: 12px; }
.wl-preview-idx { color: #948b7f; font-size: 11px; }
.wl-preview-note { margin: 8px 0 0; color: #817a70; font-size: 11px; text-align: center; }
.wl-preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2rem;
  color: #948d82;
  font-size: 11px;
}
.wl-preview-loading .ag-icon { width: 14px; height: 14px; color: #e4a55e; }
.wl-preview-card .resource-action.is-copied { color: #8bc58b; border-color: #416443; }

@media (max-width: 1120px) {
  .wl-hero.px2-hero { grid-template-columns: 1fr; }
  .wl-totals { min-width: 0; border-top: 1px solid #39352e; }
  .wl-totals > div:first-child { border-left: 0; }
}
@media (max-width: 720px) {
  .wl-table-tools { flex-wrap: wrap; }
  .wl-filter-input { width: 100%; }
  .wl-table-meta { margin-left: 0; }
  .wl-table-footer { flex-wrap: wrap; }
  .wl-distribute-control { justify-items: stretch; width: 100%; }
  .wl-distribute-control > span { max-width: none; text-align: left; }
}
/* == /ui-polish:wordlists == */

/* == ui-polish:netscan == */
/* Netscan page UI/UX pass (hierarchy, status taxonomy, loading/empty/error
   states, action discoverability). Appended block: overrides earlier nc-*
   rules by cascade order; nothing here is shared-page styling. */

/* C-1. Missing status tokens. --ok/--warning are referenced across the app but
   were never defined; --nc-info matches the existing product-badge hue. */
:root {
  --ok: #8fbe95;
  --warning: #e5b06e;
  --nc-info: #5b8def;
}

:root[data-theme="light"] {
  --ok: #059669;
  --warning: #d97706;
  --nc-info: #2563eb;
}

/* C-2. Page head + launch identity (page h1 promoted above the composer) */
.nc-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1880px;
  margin: 0 auto 0.9rem;
  padding: 0.35rem 0.25rem 0.8rem;
  border-bottom: 1px solid var(--nc-line);
}

.nc-page-title > span {
  color: var(--accent-2);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nc-page-title h1 {
  margin: 0.14rem 0 0;
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.nc-page-head .nc-launch-stats > div {
  border-left: 0;
  border-right: 1px solid var(--nc-line);
}

.nc-page-head .nc-launch-stats > div:last-child {
  border-right: 0;
}

/* Panel heading demoted from page h1 */
.nc-launch-identity h2 {
  overflow: hidden;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* C-3. Launch hint + ghost button */
.nc-launch-hint {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--warning);
  font-size: 0.64rem;
  font-weight: 750;
}

.nc-launch-hint .ag-icon { width: 0.8rem; height: 0.8rem; }

.nc-primary-button.is-ghost {
  color: var(--text);
  border-color: var(--nc-line);
  background: var(--panel);
}

/* C-4. Status taxonomy — five visually distinct groups (overrides the earlier
   .nc-status* rules by cascade order). Active=green, Waiting=blue,
   Degraded=amber, Failed=red, Stale=dashed grey. */
.nc-status {
  padding: 0.26rem 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  line-height: 1.15;
  white-space: nowrap;
}

.nc-status > i {
  width: 0.38rem;
  height: 0.38rem;
  margin-right: 0.32rem;
}

/* Active — healthy, working or done */
.nc-status-running,
.nc-status-completed {
  color: var(--ok);
  border-color: var(--ag-ok-border);
  background: var(--ag-ok-bg);
}

/* Waiting — automatic transition, no operator action needed */
.nc-status-starting,
.nc-status-queued,
.nc-status-attaching,
.nc-status-recovering {
  color: var(--nc-info);
  border-color: color-mix(in srgb, var(--nc-info) 40%, transparent);
  background: color-mix(in srgb, var(--nc-info) 13%, transparent);
}

/* Degraded — alive but held or struggling; operator may act */
.nc-status-paused,
.nc-status-stalled,
.nc-status-unresponsive,
.nc-status-busy,
.nc-status-capacity_limited {
  color: var(--warning);
  border-color: var(--ag-warning-border);
  background: var(--ag-warning-bg);
}

/* Failed — operator must act */
.nc-status-failed,
.nc-status-interrupted,
.nc-status-needs_attention,
.nc-status-stopped {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

/* Stale — data freshness, not scan health */
.nc-status-offline {
  color: var(--text-muted);
  border-style: dashed;
  border-color: color-mix(in srgb, var(--text-muted) 55%, transparent);
  background: color-mix(in srgb, var(--text-muted) 8%, transparent);
}

/* C-5. Status legend + fleet heading side */
.nc-fleet-heading-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-width: 0;
}

.nc-status-legend {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.nc-status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 750;
  white-space: nowrap;
}

.nc-status-legend i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
}

.nc-status-legend .is-active   { background: var(--ok); }
.nc-status-legend .is-waiting  { background: var(--nc-info); }
.nc-status-legend .is-degraded { background: var(--warning); }
.nc-status-legend .is-failed   { background: var(--danger); }
.nc-status-legend .is-offline  { background: transparent; border: 1px dashed var(--text-muted); }

/* C-6. Loading skeleton + empty-state strength */
.nc-run-groups.is-loading {
  gap: 0.55rem;
  padding: 0.85rem;
}

.nc-loading-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.nc-loading-note .ag-icon {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--accent-2);
  animation: ag-fleet-spin 0.9s linear infinite;
}

.nc-run-skeleton {
  display: grid;
  gap: 0.45rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--nc-line);
  border-radius: 8px;
}

.nc-run-skeleton span {
  display: block;
  height: 0.85rem;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2));
  background-size: 220% 100%;
  animation: ag-fleet-skeleton 1.4s ease-in-out infinite;
}

.nc-run-skeleton span:first-child { width: 38%; height: 1.05rem; }
.nc-run-skeleton span:last-child  { width: 72%; }

.nc-empty-state strong {
  color: var(--text);
  font-size: 0.8rem;
}

.nc-empty-state.is-error {
  color: var(--danger);
  border-color: var(--ag-danger-border);
  background: var(--ag-danger-bg);
}

.nc-empty-state.is-error span { color: var(--text-muted); }

.nc-empty-state.is-loading .ag-icon {
  animation: ag-fleet-spin 0.9s linear infinite;
}

/* C-7. Pipeline-state tones + product created-list badges */
.nc-scan-run-head .nc-pipeline-state.is-active { color: var(--ok); }
.nc-scan-run-head .nc-pipeline-state.is-attention { color: var(--warning); font-weight: 850; }
.nc-scan-run-head .nc-pipeline-state.is-complete { color: var(--nc-info); }

.nc-created-lists {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nc-created-list.is-product {
  gap: 0.28rem;
  padding: 0.25rem 0.45rem;
}

.nc-created-list.is-product img {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
}

/* Disabled placeholders: awaiting data, not an error */
.nc-run-actions button.is-awaiting:disabled {
  cursor: help;
  border-style: dashed;
  opacity: 0.8;
}

/* C-8. Labeled card controls ≥1120px (icons-only below) */
.nc-card-controls button > span,
.nc-card-controls a > span {
  display: none;
}

@media (min-width: 1120px) {
  .nc-card-controls {
    grid-auto-columns: auto;
  }

  .nc-card-controls button,
  .nc-card-controls a {
    width: auto;
    min-width: 2.2rem;
    max-width: none;
    padding: 0 0.5rem;
    gap: 0.3rem;
  }

  .nc-card-controls button > span,
  .nc-card-controls a > span {
    display: inline;
    font-size: 0.6rem;
    font-weight: 800;
  }
}

.nc-card-controls button:disabled {
  opacity: 0.45;
  cursor: wait;
}

/* C-9. Danger runtime alerts (failed / needs attention cards) */
.nc-scan-card.is-failed .nc-runtime-alert,
.nc-scan-card.is-needs_attention .nc-runtime-alert {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
}

/* C-10. Busy refresh icon + advanced disclosure */
.nc-detail-actions button.is-busy .ag-icon {
  animation: ag-fleet-spin 0.9s linear infinite;
}

.nc-advanced-fields {
  flex: 1 1 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-elev);
}

.nc-advanced-fields summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  list-style: none;
  color: var(--text-dim);
  font-size: 0.62rem;
  font-weight: 800;
}

.nc-advanced-fields summary::-webkit-details-marker { display: none; }
.nc-advanced-fields summary .ag-icon { width: 0.85rem; height: 0.85rem; color: var(--accent-2); }

.nc-advanced-fields summary small {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
}

.nc-advanced-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  padding: 0.45rem 0.55rem 0.55rem;
  border-top: 1px solid var(--nc-line);
}

.nc-advanced-grid .nc-compact-field {
  flex: 1 1 8.5rem;
  width: auto;
}

/* C-11. Online-only filter for the netscan page (aliases the sc-* look;
   the scanner page keeps its sc-online-filter rules untouched). */
.nc-online-filter {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #413c34;
  border-radius: 10px;
  color: #c7bfb4;
  background: #181714;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.nc-online-filter:hover {
  border-color: #887057;
  color: #f2eee8;
  background: #2c2821;
}

.nc-online-filter.is-active {
  border-color: #9ccc5d;
  color: #181714;
  background: #9ccc5d;
}

.nc-online-filter .ag-icon {
  width: 14px;
  height: 14px;
}

/* C-13. Small-screen adjustments */
@media (max-width: 720px) {
  .nc-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .nc-fleet-heading-side {
    justify-content: flex-start;
  }

  .nc-online-filter { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .nc-loading-note .ag-icon,
  .nc-run-skeleton span,
  .nc-empty-state.is-loading .ag-icon,
  .nc-detail-actions button.is-busy .ag-icon { animation: none; }
}
/* == /ui-polish:netscan == */

/* == ui-polish:cracked-compact == */
/* Compact collapsible cracked rows: one line when closed, details on expand. */
.cracked-results-table--compact {
  table-layout: fixed;
  width: 100%;
}

.cracked-results-table--compact td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.cracked-row {
  cursor: pointer;
}

.cracked-row.is-expanded td {
  background: rgba(250, 249, 245, 0.04);
  border-bottom: none;
}

.cracked-expander {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted, var(--text-dim));
  transition: transform 0.15s ease;
}

.cracked-expander.is-open {
  transform: rotate(90deg);
}

.cracked-expander .ag-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.cracked-cell-product {
  white-space: nowrap;
}

.cracked-product-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  min-height: 1.35rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.cracked-product-badge .ag-icon {
  width: 0.86rem;
  height: 0.86rem;
  flex: 0 0 auto;
}

.cracked-product-badge.is-cli-proxy {
  color: var(--cpa);
  background: var(--ag-info-bg);
  border: 1px solid var(--ag-info-border);
}

.cracked-product-badge.is-sub2api {
  color: var(--accent-2);
  background: var(--ag-warning-bg);
  border: 1px solid var(--ag-warning-border);
}

.cracked-product-badge.is-nine-router {
  color: var(--ok);
  background: var(--ag-ok-bg);
  border: 1px solid var(--ag-ok-border);
}

.cracked-product-badge.is-new-api {
  color: #14b8a6;
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(20, 184, 166, 0.35);
}

.cracked-product-badge.is-ccflare {
  color: #f38020;
  background: rgba(243, 128, 32, 0.14);
  border: 1px solid rgba(243, 128, 32, 0.35);
}

.cracked-detail-row > td {
  padding: 0;
  background: rgba(10, 10, 12, 0.35);
  border-top: none;
  white-space: normal;
}

.cracked-row-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem 1.4rem;
  padding: 0.8rem 1rem 1rem 2.4rem;
}

.cracked-row-detail-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted, var(--text-dim));
}

.cracked-row-detail-facts {
  margin: 0;
  display: grid;
  gap: 0.28rem;
}

.cracked-row-detail-facts div {
  display: flex;
  gap: 0.55rem;
  font-size: 0.76rem;
  min-width: 0;
}

.cracked-row-detail-facts dt {
  color: var(--text-muted, var(--text-dim));
  flex: 0 0 5.6rem;
}

.cracked-row-detail-facts dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cracked-row-detail-actions .resource-actions {
  flex-wrap: wrap;
}
/* == /ui-polish:cracked-compact == */

/* Single-line closed rows: keep badge stacks on one line inside the fixed cell. */
.cracked-results-table--compact .cracked-badge-stack {
  flex-wrap: nowrap;
  overflow: hidden;
}

/* Keep row quick-actions on one line inside the narrow actions cell. */
.cracked-results-table--compact .resource-actions {
  flex-wrap: nowrap;
  overflow: hidden;
}

/* == fleet-status: shared fleet member badge (Spec 20) == */
.fleet-status {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
  padding: 0.14rem 0.42rem;
  color: var(--text-2);
  background: color-mix(in srgb, var(--surface-raised) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.625rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.fleet-status__dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--text-3);
}

.fleet-status__chip  { font-weight: 800; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.fleet-status__meta  { overflow: hidden; font-weight: 500; color: var(--text-3); text-overflow: ellipsis;
                       text-transform: none; letter-spacing: 0; }

/* READY — green tinted pill, the only green on a card */
.fleet-status--online { border-color: color-mix(in srgb, var(--ok) 38%, var(--line));
                        background: color-mix(in srgb, var(--ok) 10%, transparent); }
.fleet-status--online .fleet-status__dot { background: var(--ok); box-shadow: var(--glow-ok); }
.fleet-status--online .fleet-status__chip { color: var(--ok-bright); }

/* DEGRADED — single amber pill; there is never a second badge or notice */
.fleet-status--degraded { border-color: color-mix(in srgb, var(--warn) 40%, var(--line));
                          background: color-mix(in srgb, var(--warn) 10%, transparent); }
.fleet-status--degraded .fleet-status__dot { background: var(--warn);
                                             box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.fleet-status--degraded .fleet-status__chip { color: var(--warn-bright); }

/* OFFLINE — red pill; card also greys via .is-offline */
.fleet-status--offline { border-color: color-mix(in srgb, var(--crit) 38%, var(--line));
                         background: color-mix(in srgb, var(--crit) 9%, transparent); }
.fleet-status--offline .fleet-status__dot { background: var(--crit); box-shadow: var(--glow-crit); }
.fleet-status--offline .fleet-status__chip { color: var(--crit); }

/* STALE — hollow amber dot distinguishes it from DEGRADED at a glance */
.fleet-status--stale .fleet-status__dot { background: transparent;
  border: 1.5px solid var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 12%, transparent); }
.fleet-status--stale .fleet-status__chip { color: var(--warn); }

.fleet-status--unknown .fleet-status__chip { color: var(--text-3); }

/* Dense variants */
.fleet-status.is-dot   { padding: 0; background: none; border: 0; gap: 0; }
.fleet-status.is-bare  { padding: 0.14rem 0.42rem; }
.fleet-status.is-dot .fleet-status__dot { width: 0.5rem; height: 0.5rem; }
/* == /fleet-status == */

/* == ag-ds: design-system roles (Spec 20) == */
/* Role tokens. Legacy names (netscan.css :root) are re-pointed at roles via the
   alias block below so ~500 existing rules resolve through one palette. Dark
   values are the current warm-charcoal ladder, recalibrated: no pure black, one
   green (the old --ag-online-dot #63d957 was neon and is retired), AA contrast
   on --surface for every text/signal token (see Spec 20 §1.3). */

:root,
:root[data-theme="dark"] {
  /* Surface ladder — warm charcoal, floor is #131210 (never #000) */
  --bg-0: #131210;            /* app background               (was --bg #141413) */
  --bg-1: #1a1815;            /* topbar, sticky rails         (was --bg-elev) */
  --bg-2: #201e1b;            /* panels                       (was --panel) */
  --surface: #26231f;         /* cards                        (was sc/px card bg) */
  --surface-raised: #2c2925;  /* hover, popovers, skeleton    (was --panel-3) */

  /* Lines */
  --line: #38342d;            /* hairline (was --border #3d3932, dimmed 1 step) */
  --line-strong: #46403a;     /* hovered borders, active card outline */

  /* Text — all AA on --surface (#26231f) */
  --text-1: #f1ede4;          /* 13.9:1  titles, values */
  --text-2: #c8c0b3;          /*  8.6:1  body, secondary */
  --text-3: #9c9184;          /*  4.9:1  small-caps labels, meta (never below this) */

  /* Signal — one hue per meaning, all ~5:1+ on --surface */
  --accent: #d97757;          /* copper — primary action, active nav */
  --accent-2: #e5b06e;        /* amber — kickers, small-caps accents */
  --ok: #8fbe95;              /* READY. Retires --ag-online-dot #63d957 */
  --ok-bright: #a4cead;       /* value numerals on ok tiles (7.3:1) */
  --warn: #e5b06e;            /* DEGRADED / STALE (shares accent-2 hue on purpose) */
  --warn-bright: #eec489;
  --crit: #e8776b;            /* OFFLINE / errors (5.1:1) */
  --info: #7ba3de;            /* neutral notices, "loading" copy */

  /* Elevation + focus */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 14px 36px rgba(0, 0, 0, 0.38);
  --glow-accent: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  --glow-ok: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent);
  --glow-crit: 0 0 0 3px color-mix(in srgb, var(--crit) 20%, transparent);

  /* Radii + spacing */
  --r-pill: 999px;
  --r-chip: 6px;
  --r-control: 8px;   /* inputs, buttons */
  --r-card: 10px;     /* VPS cards */
  --r-panel: 14px;    /* heroes, panels (was ns-panel 16px — tightened) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
}

:root[data-theme="light"] {
  --bg-0: #eeece7;
  --bg-1: #f7f5f1;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-raised: #f4f1eb;
  --line: #ddd7cd;
  --line-strong: #c9c1b2;
  --text-1: #211d17;
  --text-2: #4d463c;
  --text-3: #6f6659;
  --accent: #b85c3d;
  --accent-2: #9a6b1f;
  --ok: #2f7d4a;
  --ok-bright: #276b40;
  --warn: #96650f;
  --warn-bright: #7d540c;
  --crit: #bc3a30;
  --info: #33598f;
  --shadow-1: 0 1px 2px rgba(60, 50, 38, 0.10);
  --shadow-2: 0 14px 36px rgba(60, 50, 38, 0.14);
}

/* Alias block — legacy names resolve through roles. Every pre-existing rule
   that reads --panel/--border/--text/--danger/… picks up the recalibration
   with zero template edits. */
:root,
:root[data-theme="dark"] {
  --bg: var(--bg-0);
  --bg-elev: var(--bg-1);
  --panel: var(--bg-2);
  --panel-2: var(--surface);
  --panel-3: var(--surface-raised);
  --surface-raised-legacy: var(--surface-raised);
  --border: var(--line);
  --text: var(--text-1);
  --text-dim: var(--text-2);
  --text-muted: var(--text-3);
  --danger: var(--crit);
  --cpa: var(--ok);
  --warning: var(--warn);
  --ag-online-dot: var(--ok);          /* retire neon #63d957 everywhere at once */
  --ag-ok-bg: color-mix(in srgb, var(--ok) 13%, transparent);
  --ag-ok-border: color-mix(in srgb, var(--ok) 34%, transparent);
  --ag-warning-bg: color-mix(in srgb, var(--warn) 13%, transparent);
  --ag-warning-border: color-mix(in srgb, var(--warn) 34%, transparent);
  --ag-danger-bg: color-mix(in srgb, var(--crit) 13%, transparent);
  --ag-danger-border: color-mix(in srgb, var(--crit) 36%, transparent);
  --ag-info-bg: color-mix(in srgb, var(--accent) 14%, transparent);
  --ag-info-border: color-mix(in srgb, var(--accent) 34%, transparent);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}

/* Light-theme alias parity: netscan.css re-points the same legacy names under
   [data-theme="light"], so the role tokens above must resolve there too. */
:root[data-theme="light"] {
  --bg: var(--bg-0);
  --bg-elev: var(--bg-1);
  --panel: var(--bg-2);
  --panel-2: var(--surface);
  --panel-3: var(--surface-raised);
  --surface-raised-legacy: var(--surface-raised);
  --border: var(--line);
  --text: var(--text-1);
  --text-dim: var(--text-2);
  --text-muted: var(--text-3);
  --danger: var(--crit);
  --cpa: var(--ok);
  --warning: var(--warn);
  --ag-online-dot: var(--ok);
  --ag-ok-bg: color-mix(in srgb, var(--ok) 13%, transparent);
  --ag-ok-border: color-mix(in srgb, var(--ok) 34%, transparent);
  --ag-warning-bg: color-mix(in srgb, var(--warn) 13%, transparent);
  --ag-warning-border: color-mix(in srgb, var(--warn) 34%, transparent);
  --ag-danger-bg: color-mix(in srgb, var(--crit) 13%, transparent);
  --ag-danger-border: color-mix(in srgb, var(--crit) 36%, transparent);
  --ag-info-bg: color-mix(in srgb, var(--accent) 14%, transparent);
  --ag-info-border: color-mix(in srgb, var(--accent) 34%, transparent);
  --shadow: 0 14px 36px rgba(60, 50, 38, 0.14);
}

/* == ag-ds:type == */
.ag-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ag-label {
  margin: 0;
  color: var(--text-3);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ag-text-sm { color: var(--text-2); font-size: 0.75rem; line-height: 1.5; }

.ag-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.ag-page-head h1,
.ag-panel-title,
.ag-stat-value,
.fleet-status__chip { font-variant-numeric: tabular-nums; }
/* == /ag-ds:type == */
/* == /ag-ds == */

/* == ag-ds:page-head + stat tiles == */
.ag-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  max-width: 1880px;
  margin: 0 auto var(--sp-4);
  padding: var(--sp-1) var(--sp-1) var(--sp-4);
  border-bottom: 1px solid var(--line);
}

.ag-page-title { display: grid; gap: 0.2rem; min-width: 0; justify-items: start; }
.ag-page-title h1 { margin: 0; font-size: clamp(1.45rem, 2vw, 1.9rem); font-weight: 800;
                    letter-spacing: -0.03em; line-height: 1.05; color: var(--text-1); }
.ag-page-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }

.ag-stat-tiles { display: flex; flex-wrap: wrap; align-items: stretch; margin: 0; }
.ag-stat-tiles > div {
  display: grid;
  gap: 0.2rem;
  min-width: 5rem;
  padding: var(--sp-2) var(--sp-4);
  content-visibility: auto;
  border-left: 1px solid var(--line);
}
.ag-stat-tiles > div:first-child { border-left: 0; padding-left: var(--sp-2); }
.ag-stat-tiles dd { margin: 0; color: var(--text-1); font-size: 1.05rem; font-weight: 800;
                    font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ag-stat-tiles .is-ok   dd { color: var(--ok-bright); }
.ag-stat-tiles .is-warn dd { color: var(--warn-bright); }
.ag-stat-tiles .is-crit dd { color: var(--crit); }
.ag-stat-tiles .is-ok   { background: color-mix(in srgb, var(--ok) 5%, transparent); }
.ag-stat-tiles .is-warn { background: color-mix(in srgb, var(--warn) 5%, transparent); }
.ag-stat-tiles .is-crit { background: color-mix(in srgb, var(--crit) 5%, transparent); }
/* == /ag-ds:page-head == */

/* == ag-ds:buttons == */
.ag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.1rem;
  padding: 0.42rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  transition: filter 140ms ease, border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.ag-btn .ag-icon { width: 0.85rem; height: 0.85rem; }
.ag-btn:active { transform: translateY(0) scale(0.98); }
.ag-btn:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }
.ag-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.ag-btn--primary {
  color: #1b120c;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-1);
}
.ag-btn--primary:hover:not(:disabled) { filter: brightness(1.07); }

.ag-btn--secondary {
  color: var(--text-1);
  background: var(--surface);
  border-color: var(--line-strong);
}
.ag-btn--secondary:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-raised); }

.ag-btn--danger {
  color: var(--crit);
  background: color-mix(in srgb, var(--crit) 10%, transparent);
  border-color: color-mix(in srgb, var(--crit) 38%, var(--line));
}
.ag-btn--danger:hover:not(:disabled) { background: color-mix(in srgb, var(--crit) 18%, transparent); }

.ag-btn--ghost {
  color: var(--text-2);
  background: transparent;
  border-color: var(--line);
}
.ag-btn--ghost:hover:not(:disabled) { color: var(--text-1); border-color: var(--line-strong); }

.ag-btn--sm { min-height: 1.7rem; padding: 0.26rem 0.6rem; font-size: 0.7rem; }
/* Existing ns-btn-sm / nc-primary-button rules stay (Spec 20 §3.3); new
   markup uses ag-btn. No legacy rule is deleted in this pass. */
/* == /ag-ds:buttons == */

/* == ag-ds:vps-card == */
.ag-vps-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 2px solid color-mix(in srgb, var(--server-color) 58%, var(--line));
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, opacity 160ms ease;
}
.ag-vps-card:hover { border-top-color: color-mix(in srgb, var(--server-color) 82%, var(--line-strong)); }

.ag-vps-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.ag-vps-card-id { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.ag-vps-card-id i {
  flex: 0 0 auto;
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--server-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--server-color) 16%, transparent);
}
.ag-vps-card-id strong {
  overflow: hidden; color: var(--text-1); font-size: 0.8125rem; font-weight: 800;
  letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap;
}
.ag-vps-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: 0.45rem var(--sp-3); border-top: 1px solid var(--line);
  color: var(--text-3); font-size: 0.6875rem; font-variant-numeric: tabular-nums;
}

/* Presence-driven card states — one source, the badge class */
.ag-vps-card.is-online   { opacity: 1; }
.ag-vps-card.is-degraded { opacity: 1; border-top-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.ag-vps-card.is-stale,
.ag-vps-card.is-unknown  { opacity: 0.75; }
.ag-vps-card.is-offline  { opacity: 0.45; filter: saturate(0.6); }

/* Interaction states */
.ag-vps-card.is-selected,
.ag-vps-card.selected {
  border-color: color-mix(in srgb, var(--server-color) 55%, var(--line));
  background: color-mix(in srgb, var(--server-color) 8%, var(--surface));
}
.ag-vps-card.is-running,
.ag-vps-card.is-starting {
  border-color: var(--server-color);
  transform: translateY(-1px);
}

/* Run pill — progress-row occupancy of a VPS; copper family, never green/amber/red */
.ag-run-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.12rem 0.5rem;
  color: var(--accent-2);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: var(--r-pill);
  font-size: 0.625rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* Layout precedence (Spec 20 §3.4: "applied alongside each page's existing
   card class so page-specific inner CSS keeps working"). `.sc-server-card`
   and `.px3-vps-card` define their own grid/box templates (a 5-row
   auto auto 1fr auto auto grid; a flex column) whose child rules
   (`.sc-card-error`, `.px3-card-head`, …) assume that layout. The generic
   `.ag-vps-card` 3-row grid appears later in the file at equal (0,1,0)
   specificity, so it was clobbering both. These combined selectors carry
   (0,2,0) specificity and restate only the layout-affecting properties
   the shell changed — every other shell rule (border, radius, background,
   shadows, state opacity) still applies. */
.ag-vps-card.sc-server-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  min-height: 176px;
}

.ag-vps-card.px2-vps-card,
.ag-vps-card.px3-vps-card {
  display: flex;
  flex-direction: column;
}
/* == /ag-ds:vps-card == */

/* == ag-ds:panel == */
.ag-panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-1);
}
.ag-panel > *:first-child { border-radius: var(--r-panel) var(--r-panel) 0 0; }
.ag-panel-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.ag-panel-title { margin: 0.1rem 0 0; color: var(--text-1); font-size: 0.95rem; font-weight: 800;
                  letter-spacing: -0.01em; line-height: 1.1; }
.ag-panel-actions { display: flex; align-items: center; gap: var(--sp-2); }
/* == /ag-ds:panel == */

/* == ag-ds:empty == */
.ag-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--text-2);
}
.ag-empty .ag-icon { width: 1.15rem; height: 1.15rem; color: var(--text-3); }
.ag-empty strong { display: block; color: var(--text-1); font-size: 0.8125rem; font-weight: 800; }
.ag-empty span   { display: block; color: var(--text-3); font-size: 0.75rem; }
/* == /ag-ds:empty == */

/* == ag-ds:nav == */
/* Spec 20 §3.1 — labeled tabs. `.ag-tab` (above) is a fixed 2.35rem
   icon-only grid cell; the labeled variant switches it to a free-width
   flex row (icon + label) so the label span never clips inside the
   2.35rem box or wraps onto sibling tabs. The tooltip stays as-is. */
.ag-tab--labeled {
  display: inline-flex;
  width: auto;
  min-width: 2.35rem;
  padding: 0 0.55rem;
  gap: 0.4rem;
}

.ag-tab-label {
  color: inherit;
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.ag-tab--labeled.active .ag-tab-label { color: var(--text-1); }

@media (max-width: 1439px) {
  .ag-tab-label { display: none; }
  .ag-tab--labeled { width: 2.35rem; padding: 0; }
}
/* == /ag-ds:nav == */

/* == ag-ds:notice == */
.ag-notice {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0 0 var(--sp-3);
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--text-3);
  border-radius: var(--r-chip);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 0.78rem;
}
.ag-notice .ag-icon { width: 0.9rem; height: 0.9rem; flex: none; }
.ag-notice.is-warn { border-left-color: var(--warn); }
.ag-notice.is-crit { border-left-color: var(--crit); color: var(--text-1);
                     background: color-mix(in srgb, var(--crit) 7%, var(--bg-2)); }
.ag-notice.is-ok   { border-left-color: var(--ok); }
/* == /ag-ds:notice == */
