.stepper-status {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--warning-subtle);
  padding: 0 8px;
  color: var(--warning);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

button.stepper-status:hover { filter: brightness(0.98); }
.stepper-status.success { background: var(--success-subtle); color: var(--success); }
.stepper-status .icon { width: 12px; height: 12px; }

.app-scrim {
  position: absolute;
  z-index: 20;
  inset: 0;
  background: rgba(9, 7, 28, 0.42);
  backdrop-filter: blur(1.5px);
}

.decision-dialog {
  position: absolute;
  z-index: 21;
  top: 50%;
  left: 50%;
  width: min(500px, calc(100% - 36px));
  max-height: calc(100% - 44px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border-radius: 26px;
  background: var(--card);
  padding: 20px;
  box-shadow: 0 28px 80px rgba(8, 5, 32, 0.32);
}

.dialog-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.dialog-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-interactive);
  font-size: 13px;
  font-weight: 900;
}

.dialog-icon .icon { width: 18px; height: 18px; }
.dialog-icon.warning { background: var(--warning-subtle); color: var(--warning); }
.dialog-icon.danger { background: #fff0ed; color: var(--destructive); }

.count-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.count-comparison > div {
  display: flex;
  min-height: 64px;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  border-radius: 18px;
  background: var(--muted-soft);
  padding: 12px;
}

.count-comparison > div.attention { background: var(--warning-subtle); }
.count-comparison strong { font-size: 21px; }
.count-comparison span { color: var(--muted-foreground); font-size: 9px; font-weight: 750; }
.comparison-mark { color: var(--warning) !important; font-size: 16px !important; font-weight: 900 !important; }

.impact-summary {
  margin-top: 16px;
  font-size: 9px;
  font-weight: 800;
}

.impact-table {
  display: grid;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 17px;
  background: var(--muted-soft);
  box-shadow: inset 0 0 0 1px rgba(104, 83, 147, 0.12);
}

.impact-table > div {
  display: grid;
  grid-template-columns: minmax(120px, 1.35fr) minmax(82px, 1fr) minmax(82px, 1fr);
  align-items: center;
  min-height: 35px;
  padding: 0 10px;
  box-shadow: 0 -1px 0 rgba(104, 83, 147, 0.11);
  font-size: 8px;
}

.impact-table > div:first-child { box-shadow: none; }
.impact-table span { color: var(--muted-foreground); }
.impact-table b,
.impact-table strong { text-align: right; font-size: 8px; }
.impact-table .changed { color: var(--accent-interactive); }
.impact-head { min-height: 29px !important; background: var(--accent-soft); }

.pending-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 16px;
}

.pending-steps > div {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 9px;
  border-radius: 16px;
  background: var(--muted-soft);
  padding: 10px;
  color: var(--muted-foreground);
}

.pending-steps > div.complete { background: var(--success-subtle); color: var(--success); }
.pending-steps > div.active { background: var(--accent-soft); color: var(--accent-interactive); }
.pending-steps .icon { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 999px; background: var(--card); padding: 5px; }
.pending-steps span { display: grid; gap: 2px; }
.pending-steps strong { font-size: 9px; }
.pending-steps small { color: var(--muted-foreground); font-size: 8px; }

.error-detail,
.safe-state {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  border-radius: 16px;
  padding: 11px 12px;
  font-size: 9px;
  font-weight: 750;
}

.error-detail { background: #fff0ed; color: var(--destructive); }
.safe-state { background: var(--success-subtle); color: var(--success); }
.safe-state .icon { width: 14px; height: 14px; }

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.dialog-footer > div { display: flex; gap: 7px; }
.dialog-footer.stacked { display: grid; justify-items: stretch; }
.dialog-footer.stacked > div { justify-content: flex-end; }
.dialog-footer.stacked > .text-button { justify-self: center; }
.dialog-footer.triple,
.dialog-footer.end { justify-content: flex-end; }

.primary-button,
.secondary-button,
.text-button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.primary-button { background: var(--primary); color: white; }
.secondary-button { background: var(--accent-soft); color: var(--accent-interactive); }
.text-button { background: transparent; color: var(--muted-foreground); }
.danger-text { color: var(--destructive); }
.primary-button .icon { width: 12px; height: 12px; vertical-align: -2px; }

.app-toast {
  position: absolute;
  z-index: 30;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  box-shadow: 0 16px 45px rgba(8, 5, 32, 0.28);
  font-size: 9px;
  font-weight: 800;
}

.app-toast.success .icon { color: #7ef0c4; }
.app-toast.warning .icon { color: #ffd790; }

@media (hover: hover) {
  .primary-button:hover,
  .save-button:hover { transform: translateY(-1px); background: #171332; }
  .secondary-button:hover,
  .tinted-pill:hover { background: var(--accent-soft-hover); }
}
