.operator-edit-shell {
  position: relative;
}

.operator-edit-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.operator-edit-trigger,
.operator-edit-close {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #586775;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 120ms ease, background 120ms ease, border-color 120ms ease;
}

.operator-edit-shell .muted {
  color: #586775;
}

.operator-edit-trigger:hover,
.operator-edit-trigger:focus-visible,
.operator-edit-close:hover,
.operator-edit-close:focus-visible {
  opacity: 1;
  color: #17324d;
  border-color: #ccd7e2;
  background: #f1f5f8;
  outline: none;
}

.operator-edit-trigger svg,
.operator-edit-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.operator-edit-trigger.needs-attention::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -24px 0 0 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c88719;
}

.operator-edit-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(17, 32, 48, 0.3);
  color: #263442;
}

.operator-edit-dialog::backdrop {
  background: rgba(17, 32, 48, 0.46);
}

.operator-edit-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #d8e2ee;
  background: #f8fafc;
}

.operator-edit-dialog-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.operator-edit-dialog-body {
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 18px;
}

.operator-edit-dialog-body > :first-child {
  margin-top: 0;
}

.operator-edit-auth {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e1e7ed;
}

.operator-edit-auth label,
.operator-edit-form label {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  font-weight: 600;
}

.operator-edit-auth input,
.operator-edit-form input,
.operator-edit-form select {
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #b8c5d1;
  border-radius: 5px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.operator-edit-form {
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
}

.operator-edit-form h3 {
  margin: 0 0 10px;
}

.operator-edit-dialog .btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.operator-edit-dialog .btn:disabled {
  cursor: wait;
  opacity: 0.55;
}

.operator-edit-dialog .btn-primary {
  border: 1px solid #087f83;
  background: #087f83;
  color: #fff;
}

.operator-edit-dialog .btn-secondary {
  border: 1px solid #62717e;
  background: #62717e;
  color: #fff;
}

.operator-edit-association {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f4;
}

.operator-edit-association form {
  margin: 0;
}

.operator-edit-danger {
  border: 1px solid #c5a3a3;
  background: #fff;
  color: #8b2828;
}

.operator-edit-danger:hover {
  background: #fff1f1;
}

.operator-edit-diagnostics {
  margin: 14px 0;
  color: #586775;
  font-size: 0.92rem;
}

.operator-edit-diagnostics summary {
  cursor: pointer;
}

@media (max-width: 600px) {
  .operator-edit-dialog {
    width: 100%;
    max-width: none;
    max-height: 88vh;
    margin: auto 0 0;
    border-radius: 12px 12px 0 0;
  }

  .operator-edit-dialog-body {
    max-height: calc(88vh - 70px);
  }

  .operator-edit-association {
    align-items: flex-start;
    flex-direction: column;
  }
}
