#app-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow:
    0 24px 90px #17203325,
    0 2px 8px #1720330a;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  animation: dialog-enter 0.18s ease-out;
}
#app-dialog::backdrop {
  background: #1720334a;
  backdrop-filter: blur(4px);
}
#app-dialog button,
#app-dialog input,
#app-dialog select {
  font-family: inherit;
}
#app-dialog .btn {
  min-height: 42px;
}
#app-dialog .dialog-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 28px 28px 0;
}
.dialog-heading-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  height: 44px;
  border: 1px solid #dce5ff;
  border-radius: 11px;
  color: var(--blue);
  background: #f8faff;
}
.dialog-heading-copy {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}
#app-dialog .dialog-heading-copy h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 640;
  letter-spacing: -0.55px;
  line-height: 1.3;
}
.dialog-heading-copy h2:focus {
  outline: none;
}
.dialog-heading-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.dialog-close {
  flex-shrink: 0;
  margin: -8px -8px 0 0;
}
.dialog-body {
  padding: 28px;
}
.dialog-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 84px;
  padding: 19px 28px;
  border-top: 1px solid var(--line);
  background: #fff;
  z-index: 2;
}
.dialog-footer > :only-child {
  margin-left: auto;
}
.dialog-step-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.stepper {
  display: flex;
  width: 100%;
  margin: 0 0 30px;
}
.stepper-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  flex: 1;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.stepper-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 31px);
  right: calc(-50% + 31px);
  height: 1px;
  background: var(--line);
}
.stepper-bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #d4dae6;
  border-radius: 50%;
  font-size: 13px;
  background: #fff;
  transition:
    background 0.15s,
    color 0.15s;
}
.stepper-label {
  font-size: 11.5px;
  font-weight: 500;
}
.stepper-step.is-current {
  color: var(--blue);
}
.stepper-step.is-current .stepper-bubble {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 9px #2854e823;
}
.stepper-step.is-complete {
  color: var(--blue);
}
.stepper-step.is-complete .stepper-bubble {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #dbe5ff;
}
.stepper-step.is-complete::after {
  background: #bfd0ff;
}
.stepper-step:hover .stepper-bubble {
  box-shadow: 0 0 0 4px var(--blue-soft);
}
.form-section-heading {
  margin-bottom: 22px;
}
#app-dialog .form-section-heading h3 {
  margin: 0 0 7px;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.25px;
}
.form-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 19px;
}
.form-grid-spaced {
  margin-top: 23px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: #47536a;
  font-size: 11.5px;
  font-weight: 500;
}
.form-field-wide {
  grid-column: 1 / -1;
}
.form-field input,
.form-field select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dbe0e9;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 400;
  line-height: normal;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.form-field input:hover,
.form-field select:hover {
  border-color: #b8c2d4;
}
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #2854e815;
}
.form-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.form-select-wrap {
  position: relative;
  display: block;
}
.form-select-wrap select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
}
.form-select-wrap > .icon {
  position: absolute;
  right: 12px;
  top: 14px;
  color: var(--muted);
  pointer-events: none;
}
.form-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 25px;
  padding: 13px 14px;
  border-radius: 7px;
  color: #325ac8;
  background: #f0f4ff;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.55;
}
.form-note .icon {
  flex-shrink: 0;
  margin-top: 0;
}
.form-error {
  color: var(--red);
  background: #fff3f3;
  border-radius: 6px;
  padding: 12px 14px;
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.5;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: 0.15s ease;
}
.choice-card:has(input:checked) {
  border-color: #b2c4fc;
  background: #f5f8ff;
  color: var(--blue);
}
.choice-card:hover,
.choice-person:hover {
  border-color: #a9bdf3;
}
.choice-card input,
.choice-person input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.detail-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 25px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}
.detail-summary:first-child {
  margin-top: 0;
}
.detail-summary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}
.detail-summary > div:last-child {
  min-width: 0;
}
.detail-summary strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.detail-summary span:not(.avatar) {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.detail-summary .avatar {
  flex-shrink: 0;
}
.dialog-success {
  padding: 18px 25px 30px;
  text-align: center;
}
.dialog-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 23px;
  border: 8px solid #f1faf5;
  border-radius: 50%;
  background: #ddf3e7;
  color: var(--green);
}
#app-dialog .dialog-success h3 {
  margin: 0 0 12px;
  font-size: 23px;
  font-weight: 620;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.dialog-success p {
  max-width: 330px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.detail-demo-label {
  display: inline-flex;
  border-radius: 5px;
  padding: 6px 9px;
  background: #f5f6f9;
  color: var(--muted);
  font-size: 10px;
}
.detail-rows {
  display: flex;
  flex-direction: column;
  margin: 10px 0 0;
}
.detail-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 22px;
  padding: 15px 0;
  border-bottom: 1px solid #eef0f4;
  font-size: 12px;
  line-height: 1.6;
}
.detail-rows dt {
  flex-shrink: 0;
  color: var(--muted);
}
.detail-rows dd {
  margin: 0;
  color: var(--ink);
  text-align: right;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.detail-callout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 22px;
  border: 1px solid #e2e8f5;
  border-radius: 10px;
  background: #f8faff;
}
.detail-callout > span:first-child {
  color: var(--muted);
  font-size: 12px;
}
.detail-callout strong {
  color: var(--ink);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.9px;
}
.detail-callout .status {
  margin-top: 3px;
}
.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px 0;
}
.detail-stat-grid > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  border-right: 1px solid var(--line);
}
.detail-stat-grid > div:last-child {
  border-right: 0;
}
.detail-stat-grid strong {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.7px;
}
.detail-stat-grid span {
  color: var(--muted);
  font-size: 11px;
}
.detail-stat-accent strong {
  color: var(--blue);
}
.detail-section-spaced {
  margin-top: 26px;
  margin-bottom: 17px;
}
.choice-people {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.choice-person:has(input:checked) {
  border-color: #b2c4fc;
  background: #f8faff;
}
.choice-person-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.choice-person-copy strong {
  font-size: 12px;
  font-weight: 550;
}
.choice-person-copy > span {
  font-size: 11px;
  color: var(--muted);
}
.choice-person > .status {
  margin-left: auto;
}
.detail-checklist {
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 12px;
}
.detail-checklist > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4a576b;
}
.detail-checklist .icon {
  color: var(--green);
}
.detail-checklist > div:last-child .icon {
  color: #9b7619;
}
.detail-profile-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.detail-profile-meta > span:last-child {
  font-size: 11px;
  color: var(--muted);
}
.detail-people {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.detail-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}
.detail-person:last-child {
  border-bottom: 0;
}
.detail-person > div {
  flex: 1;
}
.detail-person strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 5px;
}
.detail-person div > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.detail-empty {
  padding: 25px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.detail-tags > span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: #325ac8;
  font-size: 11px;
}
.detail-notification {
  display: flex;
  gap: 13px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.detail-notification:first-child {
  padding-top: 0;
}
.detail-notification-dot {
  flex: 0 0 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 5px;
}
.detail-notification-dot-muted {
  background: #b7c0d2;
}
.detail-notification strong {
  font-size: 12px;
  font-weight: 600;
}
.detail-notification p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  margin: 7px 0;
}
.detail-notification small {
  color: #8992a3;
  font-size: 10px;
}
@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 600px) {
  #app-dialog {
    max-height: calc(100dvh - 32px);
    border-radius: 12px;
  }
  #app-dialog .dialog-header {
    padding: 22px 20px 0;
    gap: 11px;
  }
  .dialog-heading-icon {
    flex-basis: 38px;
    height: 38px;
    border-radius: 9px;
  }
  #app-dialog .dialog-heading-copy h2 {
    font-size: 18px;
  }
  .dialog-heading-copy p {
    font-size: 11.5px;
  }
  .dialog-body {
    padding: 24px 20px;
  }
  .dialog-footer {
    padding: 15px 20px;
    min-height: 74px;
    flex-wrap: wrap;
  }
  .dialog-footer .btn {
    font-size: 11.5px;
  }
  .dialog-step-count {
    display: none;
  }
  .stepper {
    margin-bottom: 26px;
  }
  .stepper-label {
    font-size: 10px;
  }
  .stepper-step:not(:last-child)::after {
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
  }
  .form-grid {
    column-gap: 12px;
  }
  .form-field {
    font-size: 11px;
  }
  .form-field input,
  .form-field select {
    font-size: 13px;
  }
  .choice-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .choice-card {
    min-height: 52px;
  }
  .detail-rows > div {
    gap: 15px;
    font-size: 11.5px;
  }
  .detail-rows dt {
    max-width: 42%;
    flex-shrink: 1;
  }
  .choice-person {
    flex-wrap: wrap;
    gap: 10px;
  }
  .choice-person > .status {
    margin-left: 68px;
  }
  .detail-summary {
    padding: 15px;
  }
  .detail-person {
    flex-wrap: wrap;
  }
  .detail-person .status {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #app-dialog {
    animation: none;
  }
  .stepper-bubble,
  .choice-card,
  .form-field input,
  .form-field select {
    transition: none;
  }
}

@media (min-width: 601px) {
  .form-field {
    font-size: 13px;
  }
  .form-field input,
  .form-field select {
    font-size: 14px;
  }
  .stepper-label {
    font-size: 12px;
  }
  .dialog-heading-copy p,
  .form-section-heading p {
    font-size: 13px;
  }
}
