.oe-dialog {
  --oe-ink: #182331;
  --oe-muted: #627082;
  --oe-line: #e2e4eb;
  --oe-accent: #6949bc;
  box-sizing: border-box;
  width: min(600px, calc(100% - 32px));
  max-width: none;
  max-height: min(90dvh, 860px);
  margin: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  border: 1px solid #dbdce5;
  border-radius: 16px;
  background: #fff;
  color: var(--oe-ink);
  box-shadow: 0 20px 80px #18233135;
  text-align: left;
  font: 400 1rem/1.5 "Inter", "Microsoft YaHei", "PingFang SC", sans-serif;
  color-scheme: light;
}
.oe-dialog::backdrop { background: rgb(24 27 44 / 43%); }
.oe-dialog *, .oe-dialog *::before, .oe-dialog *::after { box-sizing: border-box; }
.oe-dialog h2, .oe-dialog h3, .oe-dialog p, .oe-dialog dl, .oe-dialog dd { margin: 0; }
.oe-header {
  padding: 17px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--oe-line);
  gap: 12px;
}
.oe-heading, .oe-profile, .oe-choice, .oe-service-chip, .oe-service-link,
.oe-scope, .oe-links, .oe-actions { display: flex; align-items: center; }
.oe-heading { gap: 12px; }
.oe-heading h2 { color: var(--oe-ink); font: inherit; font-size: 1.2rem; font-weight: 680; }
.oe-heading h2:focus { outline: none; }
.oe-symbol {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  background: #f1edfd;
  color: var(--oe-accent);
  font: 600 1.25rem/1 system-ui, sans-serif;
}
.oe-dialog .oe-button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 16px;
  min-height: 38px;
  background: #fff;
  color: var(--oe-ink);
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
  font-weight: 550;
  line-height: 1.4;
}
.oe-dialog .oe-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  color: var(--oe-muted);
  font: 400 1.5rem/1 system-ui, sans-serif;
}
.oe-dialog .oe-close:hover, .oe-dialog .oe-secondary:hover { background: #f4f3f9; }
.oe-dialog .oe-primary { color: #fff; background: var(--oe-accent); }
.oe-dialog .oe-primary:hover { background: #5939a8; }
.oe-dialog .oe-secondary { border-color: var(--oe-line); }
.oe-dialog .oe-remove { color: #a83e50; padding-inline: 8px; }
.oe-dialog .oe-remove:hover { background: #fdf0f1; }
.oe-dialog .oe-danger { background: #b23e50; color: #fff; }
.oe-dialog .oe-danger:hover { background: #912f3f; }
.oe-dialog :is(button, a, input, select, textarea):focus-visible,
.oe-choice input:focus-visible + .oe-service-chip {
  outline: 3px solid #a78ce6;
  outline-offset: 2px;
}
.oe-body { display: grid; gap: 22px; padding: 21px 24px 24px; }
.oe-section { display: grid; gap: 10px; min-width: 0; }
.oe-dialog .oe-section-title {
  margin: 0;
  padding: 0;
  color: var(--oe-ink);
  font-size: .97rem;
  line-height: 1.5;
  font-weight: 660;
}
.oe-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.oe-field { display: grid; gap: 5px; min-width: 0; }
.oe-label { color: #435062; font-size: .875rem; }
.oe-required { color: var(--oe-accent); }
.oe-dialog .oe-control {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  padding: 7px 10px;
  border: 1px solid #d9dce5;
  border-radius: 7px;
  background: #fff;
  color: var(--oe-ink);
  font: inherit;
  font-size: .9375rem;
  line-height: 1.5;
}
.oe-dialog .oe-control::placeholder { color: #79818d; }
.oe-dialog .oe-control:disabled { background-color: #f5f5f8; color: #858997; }
.oe-dialog .oe-control[aria-invalid="true"] { border-color: #bd4c5f; }
.oe-dialog select.oe-control {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23627082' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='m5 6.5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.oe-dialog textarea.oe-control { resize: vertical; }
.oe-field.oe-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  justify-content: space-between;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f6f3fd;
}
.oe-scope .oe-label { color: #61479d; font-weight: 600; }
.oe-dialog .oe-scope select { width: 132px; min-height: 33px; padding-block: 4px; }
.oe-services { margin: 0; padding: 0; border: 0; min-width: 0; }
.oe-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.oe-choice { position: relative; min-width: 0; cursor: pointer; }
.oe-choice input { width: 1px; height: 1px; opacity: 0; position: absolute; }
.oe-service-chip, .oe-service-link {
  border: 1px solid var(--oe-line);
  border-radius: 7px;
  gap: 7px;
  padding: 7px 9px;
  color: var(--oe-ink);
  font-size: .875rem;
  text-decoration: none;
}
.oe-service-chip { width: 100%; min-height: 38px; }
.oe-service-chip:hover, .oe-service-link:hover { border-color: #b7a6dd; }
.oe-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.oe-tick {
  flex: none;
  display: grid;
  place-content: center;
  width: 14px;
  height: 14px;
  margin-left: auto;
  border: 1px solid #c5cad3;
  border-radius: 4px;
  background: #fff;
}
.oe-choice input:checked + .oe-service-chip { background: #f5f2fd; border-color: #bda9e8; }
.oe-choice input:checked + .oe-service-chip .oe-tick { background: var(--oe-accent); border-color: transparent; }
.oe-choice input:checked + .oe-service-chip .oe-tick::after {
  content: "";
  width: 7px;
  height: 4px;
  margin-top: -2px;
  border-left: 1.5px solid white;
  border-bottom: 1.5px solid white;
  transform: rotate(-45deg);
}
.oe-dialog .oe-error {
  margin: 0 24px 14px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff2f3;
  color: #982c3f;
  font-size: .9rem;
}
.oe-dialog [hidden] { display: none !important; }
.oe-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--oe-line);
  background: #fff;
}
.oe-split { justify-content: space-between; }
.oe-profile { gap: 13px; min-width: 0; }
.oe-avatar {
  display: grid;
  flex: none;
  place-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: #f1edfd;
  background: color-mix(in srgb, var(--oe-avatar-color) 18%, white);
  color: color-mix(in srgb, var(--oe-avatar-color) 65%, #182331);
  font-size: 1.3rem;
  font-weight: 650;
}
.oe-identity { min-width: 0; overflow-wrap: anywhere; }
.oe-identity h3 { color: var(--oe-ink); font-size: 1.15rem; line-height: 1.4; font-weight: 650; }
.oe-dialog .oe-identity p, .oe-dialog .oe-muted { color: var(--oe-muted); font-size: .9rem; }
.oe-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--oe-line);
  border-radius: 10px;
  background: #fafafe;
}
.oe-details div { min-width: 0; }
.oe-details dt { color: var(--oe-muted); font-size: .875rem; }
.oe-dialog .oe-details dd { margin: 2px 0 0; color: var(--oe-ink); font-size: .94rem; font-weight: 570; overflow-wrap: anywhere; }
.oe-links { flex-wrap: wrap; gap: 7px; }
.oe-link-hint { line-height: 1.6; }
.oe-note-text, .oe-confirm { color: var(--oe-ink); overflow-wrap: anywhere; }
.oe-note-text { white-space: pre-wrap; }
.oe-confirm { gap: 5px; }
@media (max-width: 560px) {
  .oe-dialog { max-height: 92dvh; width: calc(100% - 20px); }
  .oe-heading h2 { font-size: 1.1rem; }
  .oe-header, .oe-actions { padding: 13px 15px; }
  .oe-body { gap: 18px; padding: 17px 15px 20px; }
  .oe-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oe-dialog .oe-control { font-size: 1rem; }
  .oe-dialog .oe-error { margin-inline: 15px; }
}
@media (max-width: 440px) {
  .oe-pair { grid-template-columns: 1fr; gap: 10px; }
}
