:root {
  --font-scale: 1;
  --bg: #0a0f16;
  --bg-elevated: #121a24;
  --bg-soft: #172230;
  --bg-input: #0f1722;
  --line: #243245;
  --line-strong: #31445c;
  --ink: #eff5fb;
  --muted: #94a7bb;
  --muted-strong: #c2d0df;
  --primary: #2471ff;
  --primary-strong: #1a58cb;
  --accent: #24b877;
  --accent-soft: rgba(36, 184, 119, 0.12);
  --warning: #d4972d;
  --danger: #d75e5e;
  --ok: #25a56d;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: calc(16px * var(--font-scale));
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(36, 113, 255, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(36, 184, 119, 0.1), transparent 24%),
    var(--bg);
  color: var(--ink);
}

input,
select,
textarea,
button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.control-console-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
}

.control-console-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 100vh;
  padding: 24px 20px;
  background:
    linear-gradient(180deg, rgba(13, 20, 31, 0.98) 0%, rgba(10, 15, 22, 0.98) 100%),
    var(--bg);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand,
.sidebar-section {
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.sidebar-logo {
  display: block;
  width: 170px;
  max-width: 100%;
  height: auto;
  margin-bottom: 14px;
}

.sidebar-brand-copy h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

.sidebar-brand-copy p:last-child,
.sidebar-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.sidebar-group-label,
.panel-kicker,
.route-step,
.summary-label,
.overview-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #9ab2c8;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav-tree {
  gap: 10px;
}

.sidebar-nav-subgroup {
  display: grid;
  gap: 8px;
}

.sidebar-nav-subtitle {
  display: block;
  padding: 2px 14px 0;
  color: #9ab2c8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 800;
}

.sidebar-nav-children {
  display: grid;
  gap: 8px;
  margin-left: 14px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav-button {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted-strong);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.sidebar-nav-button:hover,
.sidebar-nav-button:focus-visible {
  background: rgba(36, 113, 255, 0.12);
  border-color: rgba(36, 113, 255, 0.26);
  color: var(--ink);
  transform: translateX(2px);
  outline: none;
}

.sidebar-nav-button.is-active {
  background: linear-gradient(135deg, rgba(36, 113, 255, 0.2), rgba(36, 184, 119, 0.12));
  border-color: rgba(36, 113, 255, 0.28);
  color: #fff;
}

.sidebar-nav-button.is-subitem {
  min-height: 40px;
  padding-left: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

.sidebar-user-badge {
  display: block;
  font-size: 1.12rem;
}

.sidebar-session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.control-console-topnav {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 14px 24px 0;
  backdrop-filter: blur(18px);
}

.control-console-topnav-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(17, 26, 38, 0.96), rgba(12, 19, 29, 0.96)),
    var(--bg);
  box-shadow: var(--shadow);
}

.control-console-topnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.control-console-topnav-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.control-console-topnav-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.control-console-topnav-kicker {
  color: #9ab2c8;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.64rem;
  font-weight: 800;
}

.control-console-topnav-title {
  font-size: 1rem;
  line-height: 1.1;
}

.control-console-topnav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.nimbus-topnav-item,
.nimbus-topnav-profile {
  position: relative;
}

.nimbus-topnav-item::after,
.nimbus-topnav-profile::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
}

.nimbus-topnav-trigger,
.nimbus-topnav-profile-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-strong);
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.nimbus-topnav-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nimbus-topnav-profile-trigger {
  width: 48px;
  height: 48px;
  padding: 0;
}

.nimbus-topnav-profile-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.nimbus-topnav-profile-icon svg {
  width: 100%;
  height: 100%;
}

.nimbus-topnav-trigger:hover,
.nimbus-topnav-trigger:focus-visible,
.nimbus-topnav-profile-trigger:hover,
.nimbus-topnav-profile-trigger:focus-visible,
.nimbus-topnav-item.is-active > .nimbus-topnav-trigger,
.nimbus-topnav-item.is-open > .nimbus-topnav-trigger,
.nimbus-topnav-profile.is-active > .nimbus-topnav-profile-trigger,
.nimbus-topnav-profile.is-open > .nimbus-topnav-profile-trigger {
  border-color: rgba(36, 113, 255, 0.3);
  background: linear-gradient(135deg, rgba(36, 113, 255, 0.18), rgba(36, 184, 119, 0.08));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  outline: none;
}

.nimbus-topnav-item.is-open > .nimbus-topnav-trigger::after {
  transform: rotate(225deg) translateY(-1px);
}

.nimbus-topnav-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 300px;
  max-width: min(88vw, 540px);
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(19, 28, 40, 0.98), rgba(13, 20, 31, 0.98)),
    var(--bg);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px) scale(0.97);
  transform-origin: top left;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 220ms;
}

.nimbus-topnav-item.is-open > .nimbus-topnav-panel,
.nimbus-topnav-profile.is-open > .nimbus-topnav-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.nimbus-topnav-profile-panel {
  right: 0;
  left: auto;
  min-width: 310px;
  transform-origin: top right;
}

.nimbus-topnav-panel-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.nimbus-topnav-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.nimbus-topnav-group-leaf {
  align-content: start;
}

.nimbus-topnav-group-title {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #9ab2c8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
}

.nimbus-topnav-group-title:hover,
.nimbus-topnav-group-title:focus-visible {
  color: #dfeeff;
  outline: none;
}

.nimbus-topnav-group-title.is-active {
  color: #dfeeff;
}

.nimbus-topnav-group-links {
  display: grid;
  gap: 8px;
  margin-left: 10px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nimbus-topnav-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-strong);
  font-weight: 700;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 160ms ease;
}

.nimbus-topnav-link:hover,
.nimbus-topnav-link:focus-visible {
  background: rgba(36, 113, 255, 0.12);
  border-color: rgba(36, 113, 255, 0.24);
  color: var(--ink);
  transform: translateX(2px);
  outline: none;
}

.nimbus-topnav-link.is-active {
  background: linear-gradient(135deg, rgba(36, 113, 255, 0.2), rgba(36, 184, 119, 0.12));
  border-color: rgba(36, 113, 255, 0.28);
  color: #fff;
}

.nimbus-topnav-profile-summary {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.035);
}

.nimbus-topnav-profile-user {
  display: block;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.nimbus-topnav-profile-role {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.nimbus-topnav-profile-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.nimbus-topnav-profile-link {
  width: 100%;
  justify-content: flex-start;
}

.nimbus-topnav-profile-link.is-active {
  border-color: rgba(36, 113, 255, 0.28);
  background: linear-gradient(135deg, rgba(36, 113, 255, 0.18), rgba(36, 184, 119, 0.08));
  color: #fff;
}

.control-console-body.control-console-nav-top .control-console-shell {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}

.control-console-body.control-console-nav-top .control-console-sidebar {
  display: none;
}

.control-console-body.control-console-nav-top .control-console-main {
  padding-top: 22px;
}

.control-console-main {
  min-width: 0;
  padding: 26px 28px 286px;
}

.control-console-body.activity-dock-collapsed .control-console-main {
  padding-bottom: 142px;
}

.control-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 22px;
}

.control-topbar-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.08;
}

.control-topbar-copy p:last-child {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.control-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.font-scale-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.font-scale-indicator {
  min-width: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.button-compact {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.maintenance-banner,
.access-banner {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.maintenance-banner {
  border-color: rgba(212, 151, 45, 0.4);
  background: rgba(212, 151, 45, 0.08);
}

.maintenance-banner h3 {
  margin: 0;
}

.maintenance-banner p:last-child,
.access-banner p {
  margin: 8px 0 0;
  color: var(--muted-strong);
}

.access-banner.is-readonly {
  border-color: rgba(36, 113, 255, 0.35);
  background: rgba(36, 113, 255, 0.08);
}

.access-banner.is-maintenance {
  border-color: rgba(212, 151, 45, 0.35);
  background: rgba(212, 151, 45, 0.08);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.overview-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow);
}

.overview-value {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.25rem, 1.8vw, 1.9rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.overview-meta {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.control-console-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.control-console-workspace {
  display: block;
}

.console-workspace {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(21, 29, 40, 0.98), rgba(16, 23, 32, 0.98));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.workspace-section {
  min-width: 0;
  scroll-margin-top: 24px;
}

.workspace-section + .workspace-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 18px;
}

.workspace-section-body {
  padding: 0 24px 24px;
}

.wizard-form {
  display: block;
}

.wizard-step-copy {
  margin-bottom: 18px;
}

.wizard-route-grid,
.wizard-selection-grid {
  display: grid;
  gap: 18px;
}

.wizard-route-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.wizard-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.subsection-head-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.platform-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.platform-choice-card {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.platform-choice-card strong {
  font-size: 1rem;
}

.platform-choice-card span {
  color: var(--muted);
  font-weight: 600;
}

.platform-choice-card:hover,
.platform-choice-card:focus-visible {
  border-color: rgba(36, 113, 255, 0.34);
  background: rgba(36, 113, 255, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.platform-choice-card.is-active {
  border-color: rgba(36, 113, 255, 0.4);
  background: linear-gradient(180deg, rgba(36, 113, 255, 0.18), rgba(36, 184, 119, 0.08));
  box-shadow: inset 0 0 0 1px rgba(36, 113, 255, 0.12);
}

.platform-choice-card.is-active span {
  color: #dfeeff;
}

.platform-choice-card.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.015);
}

.platform-choice-card.is-disabled:hover,
.platform-choice-card.is-disabled:focus-visible {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
}

.wizard-step-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.wizard-step-actions .button:last-child {
  margin-left: auto;
}

.hidden-native-fields {
  display: none;
}

.console-panel {
  min-width: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(21, 29, 40, 0.98), rgba(16, 23, 32, 0.98));
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 24px;
}

.panel-span-7 {
  grid-column: span 7;
}

.panel-span-5 {
  grid-column: span 5;
}

.panel-span-6 {
  grid-column: span 6;
}

.panel-span-4 {
  grid-column: span 4;
}

.panel-span-12 {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.panel-header h3 {
  margin: 0;
  font-size: 1.35rem;
}

.panel-description {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.panel-body {
  padding: 22px;
}

.panel-subsection {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.subsection-head {
  margin-bottom: 16px;
}

.subsection-head h4 {
  margin: 0;
  font-size: 1rem;
}

.subsection-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.job-form,
.mode-grid,
.mapping-grid,
.stack-list,
.health-panel,
.widget-status-row {
  min-width: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #73879d;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(36, 113, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(36, 113, 255, 0.16);
  outline: none;
}

input[readonly] {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
}

textarea {
  resize: vertical;
}

.route-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.route-builder.wizard-connection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.route-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.route-title h4 {
  margin: 0;
  font-size: 1.22rem;
}

.route-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #7fb2ff;
}

.route-arrow-line {
  width: 1px;
  height: 78px;
  background: linear-gradient(180deg, rgba(127, 178, 255, 0.15), rgba(127, 178, 255, 0.8), rgba(127, 178, 255, 0.15));
}

.route-arrow-head {
  font-size: 1.8rem;
}

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

.label-wide {
  grid-column: 1 / -1;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 6px;
}

.checkbox-compact {
  align-self: end;
}

.route-meta,
.panel-meta,
.discovery-meta,
.card-meta {
  color: var(--muted);
  line-height: 1.5;
}

.route-meta,
.panel-meta,
.discovery-meta {
  margin: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.submit-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(36, 184, 119, 0.28);
  background: rgba(36, 184, 119, 0.1);
  color: #d9fff0;
}

.submit-result.error {
  border-color: rgba(215, 94, 94, 0.32);
  background: rgba(215, 94, 94, 0.1);
  color: #ffe3e3;
}

.health-panel {
  display: grid;
  gap: 14px;
}

.health-panel strong {
  font-size: 1.4rem;
}

.mode-grid {
  display: grid;
  gap: 14px;
}

.mode-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mode-card input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 3px;
  padding: 0;
}

.mode-card-copy strong {
  display: block;
  font-size: 1.05rem;
}

.mode-card-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.connection-pill,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.connection-pill.pending,
.badge.pending {
  background: rgba(148, 167, 187, 0.14);
  color: #d6e4f2;
}

.connection-pill.connected,
.badge.online,
.badge.completed {
  background: rgba(36, 184, 119, 0.14);
  color: #8df0bf;
}

.connection-pill.partial,
.badge.running,
.badge.queued {
  background: rgba(36, 113, 255, 0.16);
  color: #8cc0ff;
}

.connection-pill.failed,
.badge.failed,
.badge.error,
.badge.offline {
  background: rgba(215, 94, 94, 0.16);
  color: #ffb4b4;
}

.panel-status-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.discovery-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin: 16px 0;
}

.discovery-search-field {
  min-width: 0;
}

.warning-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.warning-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(212, 151, 45, 0.3);
  background: rgba(212, 151, 45, 0.1);
  color: #ffd79b;
}

.permission-checks-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.permission-check-list {
  display: grid;
  gap: 10px;
}

.permission-check-item {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.permission-check-item.ok {
  border-color: rgba(36, 184, 119, 0.24);
  background: rgba(36, 184, 119, 0.08);
}

.permission-check-item.warning {
  border-color: rgba(255, 186, 73, 0.26);
  background: rgba(255, 186, 73, 0.08);
}

.permission-check-item.failed {
  border-color: rgba(215, 94, 94, 0.26);
  background: rgba(215, 94, 94, 0.08);
}

.permission-check-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.permission-check-copy {
  min-width: 0;
}

.permission-check-copy h4 {
  margin: 0;
  font-size: 0.98rem;
}

.permission-check-copy p {
  margin: 6px 0 0;
  color: var(--muted-strong);
  overflow-wrap: anywhere;
}

.permission-check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.permission-check-badge.ok {
  background: rgba(36, 184, 119, 0.14);
  color: #8df0bf;
}

.permission-check-badge.warning,
.permission-check-badge.unknown {
  background: rgba(255, 186, 73, 0.14);
  color: #ffd597;
}

.permission-check-badge.failed {
  background: rgba(215, 94, 94, 0.16);
  color: #ffb4b4;
}

.source-inventory-output {
  min-width: 0;
}

.inventory-table-shell {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.inventory-table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(255, 255, 255, 0.015);
}

.inventory-table thead th,
.inventory-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #121b26;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a6b9cb;
}

.inventory-filter-row th {
  top: 46px;
  z-index: 1;
  background: #101822;
}

.inventory-sort-button {
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.inventory-sort-button.active {
  color: #8cc0ff;
}

.inventory-filter-input,
.inventory-filter-select {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.source-inventory-cell-wrap {
  max-width: 180px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.source-inventory-cell-path {
  max-width: 220px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.source-inventory-cell-action {
  width: 124px;
  min-width: 124px;
  white-space: nowrap;
}

.source-inventory-cell-action .button {
  width: 100%;
}

.inventory-table-empty {
  color: var(--muted);
  text-align: center;
}

.stack-list {
  display: grid;
  gap: 14px;
}

.list-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.list-card-button {
  width: 100%;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.list-card-button:hover,
.list-card-button:focus-visible {
  border-color: rgba(36, 113, 255, 0.28);
  background: rgba(36, 113, 255, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.list-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.list-card h3,
.list-card h4 {
  margin: 0;
}

.inventory-section {
  display: grid;
  gap: 12px;
}

.inventory-section h4 {
  margin: 0;
}

.inventory-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.summary-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.summary-node strong {
  font-size: 1.1rem;
}

.summary-node span:last-child {
  color: var(--muted);
}

.summary-connector {
  text-align: center;
  font-size: 1.5rem;
  color: #7fb2ff;
}

.summary-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-list dt {
  color: var(--muted);
}

.summary-list dd {
  margin: 0;
  text-align: right;
}

.precheck-result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.precheck-result.ok {
  border-color: rgba(36, 184, 119, 0.28);
  background: rgba(36, 184, 119, 0.08);
}

.precheck-result.warning {
  border-color: rgba(212, 151, 45, 0.28);
  background: rgba(212, 151, 45, 0.08);
}

.precheck-result.error {
  border-color: rgba(215, 94, 94, 0.28);
  background: rgba(215, 94, 94, 0.08);
}

.precheck-summary strong {
  display: block;
}

.precheck-summary p {
  margin: 8px 0 0;
  color: var(--muted-strong);
}

.precheck-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}

.precheck-metrics div {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.precheck-metrics dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.precheck-metrics dd {
  margin: 8px 0 0;
  font-weight: 700;
}

.precheck-issues {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.precheck-issue {
  padding: 12px 14px;
  border-radius: 12px;
}

.precheck-issue.error {
  background: rgba(215, 94, 94, 0.12);
  color: #ffc6c6;
}

.precheck-issue.warning {
  background: rgba(212, 151, 45, 0.12);
  color: #ffd79b;
}

.precheck-issue.info {
  background: rgba(36, 113, 255, 0.12);
  color: #b6d6ff;
}

.empty-state {
  color: var(--muted);
}

.activity-dock {
  position: fixed;
  left: 320px;
  right: 28px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 22, 31, 0.98), rgba(12, 18, 26, 0.98));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.48);
  z-index: 40;
}

.activity-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.activity-dock-header h3 {
  margin: 0;
  font-size: 1.08rem;
}

.activity-dock-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.segmented-button {
  appearance: none;
  -webkit-appearance: none;
  min-height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.segmented-button:hover,
.segmented-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  outline: none;
}

.segmented-button.is-active {
  background: linear-gradient(135deg, rgba(36, 113, 255, 0.22), rgba(36, 184, 119, 0.14));
  color: #fff;
}

.activity-dock-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.activity-dock.is-collapsed .activity-dock-meta-row,
.activity-dock.is-collapsed .activity-feed-scroll {
  display: none;
}

.activity-feed-scroll {
  max-height: 176px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.activity-feed-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.activity-feed-row:hover,
.activity-feed-row:focus-visible {
  border-color: rgba(36, 113, 255, 0.28);
  background: rgba(36, 113, 255, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.activity-feed-row.is-job {
  border-left: 3px solid rgba(36, 113, 255, 0.65);
}

.activity-feed-row.is-event {
  border-left: 3px solid rgba(36, 184, 119, 0.65);
}

.activity-feed-row.is-audit {
  border-left: 3px solid rgba(255, 185, 92, 0.7);
}

.activity-feed-time {
  display: grid;
  gap: 2px;
  color: #7fa2c5;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.activity-feed-date,
.activity-feed-clock {
  display: block;
}

.activity-feed-copy {
  min-width: 0;
}

.activity-feed-title {
  display: block;
  font-weight: 700;
  line-height: 1.35;
}

.activity-feed-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.9rem;
}

.activity-feed-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.activity-feed-kind,
.activity-feed-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.activity-feed-state.is-active {
  background: rgba(36, 113, 255, 0.16);
  color: #8cc0ff;
}

.activity-feed-state.is-succeeded {
  background: rgba(36, 184, 119, 0.16);
  color: #8df0bf;
}

.activity-feed-state.is-failed {
  background: rgba(215, 94, 94, 0.16);
  color: #ffb4b4;
}

.activity-feed-state.is-other {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
}

@media (max-width: 1480px) {
  .panel-span-7,
  .panel-span-5,
  .panel-span-6,
  .panel-span-4 {
    grid-column: span 6;
  }
}

@media (max-width: 1180px) {
  .control-console-shell {
    grid-template-columns: 1fr;
  }

  .control-console-sidebar {
    position: static;
    min-height: auto;
  }

  .control-topbar {
    flex-direction: column;
  }

  .route-builder,
  .wizard-connection-grid,
  .wizard-route-grid,
  .wizard-selection-grid {
    grid-template-columns: 1fr;
  }

  .route-arrow {
    display: none;
  }

  .activity-dock {
    left: 20px;
    right: 20px;
  }

  .control-console-topnav-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .control-console-topnav-menu {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 960px) {
  .control-console-main {
    padding: 18px;
  }

  .overview-grid,
  .control-console-grid,
  .platform-choice-grid,
  .credential-grid,
  .config-grid,
  .mapping-grid,
  .precheck-metrics,
  .discovery-toolbar {
    grid-template-columns: 1fr;
  }

  .workspace-section-header {
    flex-direction: column;
  }

  .subsection-head-with-actions,
  .wizard-step-actions {
    flex-direction: column;
  }

  .wizard-step-actions .button:last-child {
    margin-left: 0;
  }

  .panel-span-7,
  .panel-span-5,
  .panel-span-6,
  .panel-span-4 {
    grid-column: span 12;
  }

  .summary-route {
    grid-template-columns: 1fr;
  }

  .summary-connector {
    display: none;
  }

  .summary-list div {
    flex-direction: column;
  }

  .summary-list dd {
    text-align: left;
  }

  .activity-dock {
    position: static;
    margin-top: 18px;
  }

  .activity-dock-header,
  .activity-dock-meta-row,
  .activity-feed-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .activity-feed-badges {
    justify-content: flex-start;
  }

  .activity-dock-meta-row {
    justify-content: stretch;
  }

  .control-console-topnav {
    padding: 12px 18px 0;
  }

  .control-console-topnav-inner {
    padding: 14px;
  }

  .control-console-topnav-brand-copy {
    gap: 1px;
  }

  .control-console-topnav-title {
    font-size: 0.92rem;
  }

  .control-console-topnav-menu {
    gap: 8px;
  }

  .nimbus-topnav-trigger {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.94rem;
  }

  .nimbus-topnav-panel,
  .nimbus-topnav-profile-panel {
    position: fixed;
    top: 86px;
    left: 18px;
    right: 18px;
    max-width: none;
    min-width: 0;
    transform-origin: top center;
  }
}
