:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-alt: #f8faff;
  --surface-soft: #f2f5fb;
  --border: #e6ebf5;
  --border-strong: #d7e0ef;
  --text: #182236;
  --text-soft: #74809a;
  --text-faint: #96a3bd;
  --blue: #3f67ea;
  --blue-dark: #2f56d5;
  --blue-soft: rgba(63, 103, 234, 0.12);
  --green: #4bbf7d;
  --green-dark: #32a468;
  --green-soft: rgba(75, 191, 125, 0.12);
  --emerald: #4dbb82;
  --cyan: #52bfd7;
  --orange: #f0aa45;
  --purple: #9d65ef;
  --violet: #7a62ff;
  --red: #ee7b73;
  --red-soft: rgba(238, 123, 115, 0.12);
  --slate: #121a2c;
  --shadow-sm: 0 14px 30px -24px rgba(17, 29, 62, 0.35);
  --shadow-md: 0 24px 60px -32px rgba(20, 35, 74, 0.24);
  --shadow-lg: 0 40px 120px -55px rgba(14, 27, 64, 0.32);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(95, 126, 255, 0.06), transparent 28%),
    linear-gradient(180deg, #fafbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

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

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(219, 227, 240, 0.88);
  backdrop-filter: blur(22px);
  background: rgba(255, 255, 255, 0.88);
}

.topbar__inner {
  max-width: 1420px;
  margin: 0 auto;
  height: 74px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar__left,
.topbar__right,
.brand,
.topnav,
.page-head__actions,
.app-card__identity,
.app-card__stats,
.app-card__footer,
.dialog__header-main,
.dialog__title-row,
.dialog__footer-row,
.dialog__footer-actions,
.url-field__top,
.url-field__value,
.section-header,
.section-header__title-row,
.section-actions,
.mapping-column__title,
.manager-list__item,
.manager-list__actions,
.builder-card__top,
.pipeline-card__stages,
.health-pill,
.checkbox-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
}

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

.brand__mark,
.dialog__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, #4a72f0 0%, #355ee5 100%);
  box-shadow: 0 16px 36px -22px rgba(57, 93, 226, 0.85);
}

.dialog__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.brand__text {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #1a2437;
}

.topnav {
  gap: 8px;
  margin-left: 18px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(244, 247, 253, 0.88);
  border: 1px solid rgba(226, 234, 244, 0.88);
}

.topnav__link {
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-soft);
  text-transform: uppercase;
  transition: all 0.18s ease;
}

.topnav__link:hover {
  color: var(--text);
}

.topnav__link--active {
  color: #fff;
  background: linear-gradient(180deg, #4670ef 0%, #3b63e8 100%);
  box-shadow: 0 12px 32px -22px rgba(60, 99, 232, 0.9);
}

.topbar__right {
  gap: 14px;
}

.health-pill {
  gap: 10px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(188, 235, 205, 0.88);
  background: rgba(238, 252, 243, 0.92);
  color: #5b9472;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.health-pill__dot,
.status-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(76, 191, 125, 0.14);
}

.avatar-pill {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(81, 120, 239, 0.12);
  border: 1px solid rgba(132, 161, 247, 0.24);
  color: #6c88d9;
  font-size: 0.8rem;
  font-weight: 800;
}

.page-shell {
  width: min(1420px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 28px;
  flex: 1;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-head h1 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.page-head p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.98rem;
  font-weight: 500;
}

.page-head__actions {
  gap: 14px;
}

.search-input {
  min-width: 300px;
  height: 50px;
  padding: 0 16px;
  gap: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-faint);
  box-shadow: var(--shadow-sm);
}

.search-input input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.search-input input::placeholder {
  color: #adb8ce;
}

.ui-button {
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.ui-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.ui-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.ui-button--md {
  min-height: 50px;
  padding: 0 18px;
  font-size: 0.76rem;
}

.ui-button--sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.68rem;
}

.ui-button--primary {
  color: #fff;
  background: linear-gradient(180deg, #4670ef 0%, #3f66e9 100%);
  box-shadow: 0 18px 34px -24px rgba(63, 102, 233, 0.95);
}

.ui-button--success {
  color: #fff;
  background: linear-gradient(180deg, #54c588 0%, #42b878 100%);
  box-shadow: 0 18px 34px -24px rgba(72, 186, 122, 0.9);
}

.ui-button--info {
  color: #fff;
  background: linear-gradient(180deg, #5ec9e0 0%, #47bdd8 100%);
  box-shadow: 0 18px 34px -24px rgba(79, 191, 215, 0.9);
}

.ui-button--dark {
  color: #fff;
  background: linear-gradient(180deg, #182239 0%, #0f172b 100%);
  box-shadow: 0 22px 44px -28px rgba(15, 23, 43, 0.95);
}

.ui-button--secondary {
  color: #48556f;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.ui-button--ghost {
  color: var(--text-soft);
  background: transparent;
}

.ui-button--outline {
  color: var(--blue);
  background: #fff;
  border: 2px solid rgba(78, 118, 241, 0.8);
  box-shadow: none;
}

.ui-button--danger-outline {
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(248, 200, 194, 0.78);
  box-shadow: none;
}

.ui-button--chip-blue,
.ui-button--chip-red {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.ui-button--chip-blue {
  color: var(--blue);
  background: rgba(64, 103, 235, 0.08);
}

.ui-button--chip-red {
  color: #d05e58;
  background: rgba(238, 123, 115, 0.08);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.app-card,
.surface-card {
  border-radius: 28px;
  border: 1px solid rgba(229, 235, 244, 0.96);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.app-card {
  padding: 22px 22px 18px;
  min-height: 278px;
  display: flex;
  flex-direction: column;
}

.app-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.app-card__identity {
  gap: 14px;
}

.app-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: rgba(77, 115, 238, 0.08);
  border: 1px solid rgba(148, 176, 244, 0.2);
}

.app-card__identity h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.app-card__slug {
  display: block;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status-badge {
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(189, 235, 206, 0.78);
  background: rgba(239, 251, 244, 0.92);
  color: #5e9776;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-badge--inactive {
  border-color: rgba(221, 229, 241, 0.88);
  background: rgba(244, 247, 253, 0.9);
  color: var(--text-faint);
}

.status-badge--inactive .status-badge__dot {
  background: #b6c2d5;
  box-shadow: 0 0 0 5px rgba(182, 194, 213, 0.14);
}

.app-card__description {
  margin: 18px 0 20px;
  color: #7b879d;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.65;
  flex: 1;
}

.app-card__stats {
  gap: 28px;
  margin-bottom: 18px;
}

.app-card__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-card__stat-label,
.field-group__label,
.metric-card__label,
.info-row__label,
.summary-list__meta,
.builder-card__eyebrow,
.section-header__title,
.manager-group__title,
.page-footer,
.field-group__helper,
.section-header__subtitle {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-card__stat-label,
.field-group__label,
.metric-card__label,
.info-row__label,
.builder-card__eyebrow,
.page-footer,
.field-group__helper,
.section-header__subtitle {
  color: var(--text-faint);
}

.app-card__stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.app-card__footer {
  gap: 10px;
  flex-wrap: wrap;
}

.app-card__footer .ui-button {
  flex: 1 1 170px;
}

.surface-card {
  padding: 24px;
}

.surface-card--stacked {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.surface-card--placeholder {
  min-height: 340px;
  display: grid;
  place-items: center;
}

.placeholder-panel,
.empty-state {
  max-width: 520px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.placeholder-panel__icon,
.empty-state__icon {
  width: 70px;
  height: 70px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: rgba(69, 111, 238, 0.08);
  border: 1px solid rgba(159, 182, 246, 0.26);
}

.placeholder-panel h2,
.empty-state h3 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.placeholder-panel p,
.empty-state p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.page-footer {
  padding: 24px 24px 30px;
  text-align: center;
}

.dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dialog-layer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 29, 55, 0.46);
  backdrop-filter: blur(12px);
}

.dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  border: 1px solid rgba(227, 233, 245, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dialog--lg {
  max-width: 920px;
}

.dialog--xl {
  max-width: 1180px;
}

.dialog--xxl {
  max-width: 1320px;
}

.dialog__header,
.dialog__footer {
  flex: 0 0 auto;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.98);
}

.dialog__header {
  border-bottom: 1px solid rgba(231, 236, 245, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog__header-main {
  gap: 18px;
}

.dialog__titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dialog__titles h2 {
  margin: 0;
  font-size: 1.95rem;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.dialog__titles p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog__close {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a0b7;
}

.dialog__close:hover {
  background: rgba(243, 246, 252, 0.9);
  color: var(--text);
}

.dialog__body {
  overflow: auto;
  padding: 28px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.86) 0%, rgba(246, 247, 251, 0.72) 100%);
}

.dialog__footer {
  border-top: 1px solid rgba(231, 236, 245, 0.9);
  box-shadow: 0 -18px 36px -30px rgba(18, 35, 73, 0.28);
}

.dialog__footer-row {
  width: 100%;
  justify-content: space-between;
  gap: 18px;
}

.dialog__footer-actions {
  gap: 12px;
}

.form-sections,
.detail-stack,
.stats-layout,
.edit-mode-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

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

.form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group__label {
  margin-left: 4px;
}

.field-group__helper {
  margin-left: 4px;
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.74rem;
  font-weight: 600;
  color: #9aa7be;
}

.field-control,
.field-control--select {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(249, 251, 255, 0.96);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field-control:focus,
.field-control--select:focus {
  border-color: rgba(75, 117, 239, 0.9);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(75, 117, 239, 0.08);
}

.field-control--mono,
.url-field__value,
.info-row__value--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;
}

.field-control[type='password'] {
  letter-spacing: 0.08em;
}

textarea.field-control {
  min-height: 120px;
  padding: 16px 18px;
  resize: vertical;
}

.field-control-wrap {
  position: relative;
}

.field-control-wrap__icon {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: #b2bdd2;
  pointer-events: none;
}

.field-control-wrap .field-control {
  padding-right: 46px;
}

.field-control--select {
  appearance: none;
}

.checkbox-row {
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  flex: 0 0 auto;
}

.checkbox-row__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkbox-row__label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
  text-transform: uppercase;
}

.checkbox-row__helper {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
}

.checkbox-row--dense {
  align-items: flex-end;
}

.section-header {
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(237, 241, 248, 0.96);
}

.section-header__title-row {
  gap: 10px;
}

.section-header__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-flex;
}

.section-header__dot--blue {
  background: var(--blue);
}

.section-header__dot--amber {
  background: var(--orange);
}

.section-header__dot--sky {
  background: #59a8ff;
}

.section-header__dot--emerald {
  background: var(--emerald);
}

.section-header__dot--purple {
  background: var(--purple);
}

.section-header__dot--violet {
  background: var(--violet);
}

.section-header__dot--indigo {
  background: #6a70f7;
}

.section-header__dot--slate {
  background: #7e88a0;
}

.section-header__title {
  color: #1f2a40;
}

.section-header__subtitle {
  margin: 8px 0 0 18px;
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-soft);
}

.helper-chip,
.summary-list__chip,
.mapping-item__type,
.pipeline-stage,
.metric-card,
.scope-chip,
.scope-palette__chip,
.icon-chip {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(249, 251, 255, 0.96);
}

.helper-chip {
  min-height: 34px;
  padding: 0 12px;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 700;
}

.scope-manager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.scope-manager__panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(248, 250, 255, 0.72);
}

.scope-manager__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scope-manager__selected,
.scope-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.scope-manager__selected-chip {
  min-width: 0;
  min-height: 40px;
  padding: 0 8px 0 12px;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  background: #f3f7ff;
  color: #3b63d9;
  font-size: 0.76rem;
  font-weight: 800;
}

.scope-manager__selected-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.scope-manager__remove {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: rgba(65, 103, 224, 0.08);
  color: #4167e0;
  cursor: pointer;
}

.scope-manager__remove:hover {
  background: #4167e0;
  color: #fff;
}

.scope-manager__search {
  min-height: 40px;
  margin-bottom: 12px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text-muted);
}

.scope-manager__search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.scope-manager__search input:disabled {
  cursor: not-allowed;
}

.scope-palette {
  align-content: flex-start;
}

.scope-palette__chip,
.scope-chip {
  min-height: 40px;
  padding: 0 12px;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  color: #64728d;
  font-size: 0.76rem;
  font-weight: 700;
}

.scope-palette__chip {
  cursor: pointer;
}

.scope-palette__chip:hover {
  border-color: #4167e0;
  color: #4167e0;
  background: #f3f7ff;
}

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

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

.metric-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-card__value {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.url-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.url-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.url-field__top {
  justify-content: space-between;
}

.inline-link {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.url-field__value {
  gap: 14px;
  justify-content: space-between;
  padding: 16px 18px;
  line-height: 1.55;
  color: #6f7d97;
  word-break: break-all;
}

.icon-chip {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a5b1c7;
  flex: 0 0 auto;
}

.detail-grid {
  display: grid;
  gap: 22px;
}

.detail-grid--top {
  grid-template-columns: minmax(320px, 0.94fr) minmax(400px, 1.16fr);
}

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

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.info-row__value {
  color: #1f2a40;
  font-size: 0.98rem;
  font-weight: 800;
  text-align: right;
}

.info-row__value--mono {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(249, 251, 255, 0.96);
  color: #60708d;
}

.info-row__value--accent {
  color: var(--green-dark);
}

.summary-list,
.mapping-column__list,
.pipeline-stack,
.builder-stack,
.manager-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-list__item,
.mapping-item,
.manager-list__item,
.pipeline-card {
  padding: 15px 18px;
  border-radius: 18px;
  border: 1px solid rgba(233, 238, 246, 0.94);
  background: rgba(255, 255, 255, 0.96);
}

.summary-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.summary-list__title,
.manager-list__title,
.mapping-item__name,
.pipeline-card__title {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.summary-list__meta,
.manager-list__meta {
  margin-top: 4px;
  display: block;
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.75rem;
  font-weight: 600;
}

.summary-list__chip {
  padding: 8px 12px;
  color: #66748d;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mapping-grid,
.manager-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.mapping-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mapping-column__title {
  gap: 10px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mapping-column__title--emerald {
  color: var(--emerald);
}

.mapping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mapping-item__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mapping-item__dot,
.manager-group__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.mapping-item__dot--blue,
.manager-group__dot--blue {
  background: #5ea0ff;
}

.mapping-item__dot--emerald,
.manager-group__dot--emerald {
  background: #68c88f;
}

.mapping-item__type {
  padding: 7px 10px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.mapping-item__type--emerald {
  color: var(--emerald);
}

.pipeline-summary {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.pipeline-card__stages {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pipeline-stage {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  color: #6d7c94;
  font-size: 0.72rem;
  font-weight: 800;
}

.manager-layout__list,
.manager-layout__form {
  min-height: 620px;
}

.manager-group__title {
  gap: 10px;
  font-size: 0.78rem;
  color: #1f2a40;
}

.manager-group__count {
  color: var(--text-faint);
}

.manager-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manager-list__item {
  justify-content: space-between;
  gap: 16px;
}

.manager-list__actions {
  gap: 8px;
  flex-wrap: wrap;
}

.builder-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(230, 236, 245, 0.96);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

.builder-card__top {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.builder-card__top h4 {
  margin: 4px 0 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.builder-card__remove {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.parameter-builder__toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.parameter-builder__toggles .checkbox-row {
  flex: 1;
  min-width: 180px;
}

.inline-empty {
  min-height: 120px;
  border-radius: 18px;
  border: 1px dashed rgba(213, 221, 235, 0.96);
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.edit-helpers__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.design-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(78, 117, 240, 0.06);
  border: 1px solid rgba(136, 164, 247, 0.22);
  color: #5d6f8f;
  font-size: 0.86rem;
  font-weight: 600;
}

.section-search {
  min-width: 220px;
  height: 42px;
  box-shadow: none;
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 40px));
}

.toast-card {
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(16, 25, 42, 0.94);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.toast-card--success {
  background: rgba(18, 34, 61, 0.96);
}

.toast-card--error {
  background: rgba(101, 29, 27, 0.94);
}

.toast-card__icon {
  flex: 0 0 auto;
}

.toast-card__content {
  flex: 1;
  line-height: 1.55;
  font-size: 0.9rem;
  font-weight: 600;
}

.toast-card__close {
  color: rgba(255, 255, 255, 0.78);
  flex: 0 0 auto;
}

@media (max-width: 1200px) {
  .detail-grid--top,
  .detail-grid--bottom,
  .mapping-grid,
  .manager-layout,
  .form-grid--three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .topbar__inner,
  .page-shell {
    width: min(100%, calc(100% - 24px));
    padding-left: 0;
    padding-right: 0;
  }

  .topbar__inner {
    height: auto;
    padding: 14px 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar__left,
  .topbar__right,
  .page-head,
  .page-head__actions,
  .dialog__footer-row {
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    margin-left: 0;
    justify-content: space-between;
  }

  .page-head__actions .search-input,
  .section-search {
    min-width: 100%;
  }

  .apps-grid,
  .form-grid--two,
  .metric-grid,
  .scope-manager,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dialog-layer {
    padding: 12px;
  }

  .dialog {
    max-height: calc(100vh - 24px);
  }

  .dialog__header,
  .dialog__body,
  .dialog__footer {
    padding: 20px;
  }

  .dialog__title-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .brand__text {
    font-size: 1.35rem;
  }

  .topnav {
    flex-wrap: wrap;
  }

  .topnav__link {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }

  .dialog__header-main {
    align-items: flex-start;
  }

  .dialog__titles h2,
  .page-head h1 {
    font-size: 1.7rem;
  }

  .app-card__footer,
  .dialog__footer-actions,
  .edit-helpers__actions,
  .manager-list__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .app-card__footer .ui-button,
  .dialog__footer-actions .ui-button,
  .edit-helpers__actions .ui-button {
    width: 100%;
  }
}

.auth-main {
  width: min(1420px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 30px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-panel {
  width: min(100%, 1080px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 420px);
  gap: 24px;
  align-items: stretch;
}

.auth-panel__hero,
.auth-panel__card {
  border-radius: 28px;
}

.auth-panel__hero {
  padding: 36px;
  background:
    radial-gradient(circle at top right, rgba(97, 127, 255, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.96) 100%);
  border: 1px solid rgba(227, 233, 245, 0.95);
  box-shadow: var(--shadow-sm);
}

.auth-panel__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(65, 105, 236, 0.08);
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-panel__eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
}

.auth-panel__hero h1 {
  margin: 22px 0 14px;
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.auth-panel__hero > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.72;
  max-width: 640px;
}

.auth-panel__highlights {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.auth-highlight {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(225, 232, 244, 0.92);
  background: rgba(255, 255, 255, 0.9);
}

.auth-highlight__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: rgba(75, 117, 239, 0.08);
  border: 1px solid rgba(144, 170, 247, 0.24);
}

.auth-highlight strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-highlight span {
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}

.auth-panel__card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-panel__card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.auth-panel__card-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(180deg, #182239 0%, #10182d 100%);
  box-shadow: 0 20px 36px -26px rgba(16, 24, 45, 0.95);
}

.auth-panel__card-head h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.auth-panel__card-head p {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form--message {
  gap: 14px;
}

.auth-form__error {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(244, 188, 181, 0.82);
  background: rgba(255, 242, 240, 0.96);
  color: #cb5f5a;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
}

.auth-form__error--static {
  margin-bottom: 0;
}

.auth-form__message {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.62;
}

.auth-form__message code {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(241, 244, 251, 0.95);
  border: 1px solid rgba(223, 230, 242, 0.95);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;
  font-size: 0.8rem;
}

@media (max-width: 960px) {
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .auth-panel__hero h1 {
    font-size: 2.35rem;
  }
}

@media (max-width: 640px) {
  .auth-main {
    width: min(100%, calc(100% - 24px));
    padding: 24px 0 20px;
  }

  .auth-panel__hero,
  .auth-panel__card {
    padding: 24px 20px;
  }

  .auth-panel__hero h1 {
    font-size: 1.95rem;
  }
}
