/* Password field widget: input + generate/copy buttons, masked display, and the old/new/confirm edit panel. Self-contained (no dependency on admin-ui-pattern.css) so it works on both admin and user-facing pages. */

.password-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-field .password-field__input {
  flex: 1;
  min-width: 0;
}

.password-field__input {
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #2d3748;
  font-size: 15px;
  font-weight: 600;
}

.password-field__input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.16);
}

.password-field__btn {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #667eea;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.password-field__btn:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.08);
}

.password-field__btn.is-copied {
  border-color: #22c55e;
  background: #dcfce7;
  color: #16a34a;
}

.password-field-hint {
  display: block;
  margin-top: 6px;
  color: #718096;
  font-size: 12px;
  font-weight: 700;
}

.password-field--masked .password-field__input {
  letter-spacing: 3px;
  color: #718096;
  background: #f8fafc;
  cursor: default;
}

.password-toggle-edit {
  flex: 0 0 auto;
  width: auto;
  gap: 8px;
  padding: 0 16px;
}

.password-toggle-edit span {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.password-edit-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed rgba(102, 126, 234, 0.32);
  border-radius: 14px;
  background: #f8fafc;
}

.password-edit-panel .inpt:last-child {
  margin-bottom: 0;
}

.password-edit-panel .inpt label {
  display: block;
  margin-bottom: 8px;
  color: #2d3748;
  font-size: 14px;
  font-weight: 800;
}

.password-edit-panel .inpt input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #2d3748;
  font-size: 15px;
  font-weight: 600;
}

.password-edit-panel .inpt input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.16);
}
